开发者

PHP Curl: how to pass a variable ? - a beginner question;-)

good evening dear community.

I need a starting-point! A German DB that collects all the data from all German Foundations...

see this url here - just click it to see a search page

<?php
//
// The PHP curl module supports the received page to be returned in a variable
// if told.
//
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"http://www.suche.stiftungen.org/index.php?strg=87_124&baseID=129&PHPS开发者_如何学JAVAESSID=efd25e89a4986cb0981c602fc7c68780");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result=curl_exec ($ch);
curl_close ($ch);
?>

Question: Here we find all Foundations in Germany: : 8074 different foundations: You get the full results if you choose % as wildcard in the Search-field. How to do this with PHP: i think that we have to do this with curl or with file_get_contents_ - those are the best methods for doing this: What do you think, personally. I am curious to get your ideas to know! please. lemme know what you think!? BTW - probably - the XPATH and DOM-Technique can be used too. I guess so!?

First approach: see this url here - just click it to see a search page

The way to get through this database is to search (in the search-field) combinations of letters eg "ac" and select search only titles. Then go through every pair of letters. If you still get too many results for a particular pair, use 3 letters. aca, acb,...If i would have a startingpoint i would be happy.

how to enlarge the above written php-code... how to get the variables of my approach into the php-programme...!? I need to pass the variables as combinations of letters eg "ac" and select search only titles. Then i have to parse the results - then i have to go through every pair of letters.

look forward to hear from you...

zero


If you want to use % as parameter value in an URL, you need to escape it with urlencode.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜