Jump to content

Re: URL-String-concatenation within Curl-Multi: a Loop-array: [can i do like so]


Recommended Posts

Hi - good evening!




Thx for the answer and all the help so far Oncemore the "Fetching-part" for a little parser-script:


Here we go - new target urls:


see the overview:  http://dms-schule.bildung.hessen.de/index.html


Search by pressing the button "type" and then choose all schools with the mouse!

Results 2400 schools:  Here i can provide some "more help for getting the target!" -



btw: see some details for this target-server:






well - you see i have to iterate over the sites - with a function /(a loop)

http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=1000 to 10000


BTW - after fetching the page i have to see which one are empty - those ones do not need to be

parsed!  Well - i want to do this with curl-multi since this is the most advanced way to do this:


I see i have an array that can be filled I have to try it out...!!


Well, I'm not pretty sure -  but judging by the low level of PHP i have:

I think that i may need a double array to define the URLs like:



Can i do like so?:

$urls = array(
   "siteone" =>  "suche_schul_db.html?show_school=%i",
   "sitetwo" =>  "suche_schul_db.html?show_school=%i",
   "sitethree" =>"suche_schul_db.html?show_school=%i"

$params = array ( for ($i = 1; $i <= 10000; $i++) {
  // body of loop

// well i have to  define the variables in a open form like  abvove nand not below:
// better  than doing it like so:   "siteone" => array(9009, 9742, 9871),


then pass them to curl-multi as:

foreach ($urls as $id => $url) {
    foreach ($params[$id] as => $param) {
        $i = $id . $param;
        $finalurl = sprintf($url, $param);
        $conn[$i] = curl_init($finalurl);


I don't know if that's fits the needs tip that i am looking for but I hope so ;-)


Can i do like so [see above]? What  do yu think.



i send you many greetings




Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.