Jump to content

string concatenation with PHP - a newbie-question for a little Parser with cURL


dilbertone

Recommended Posts

 

Hello dear folks

 

i am currently workin on a little parser with cURL - and i have some questions here: How to do the String concatenation with PHP ; note i wanna do it with curl!

 

the target URL:  http://www.schulministerium.nrw.de/BP/SchuleSuchen?action=572.8745475728288

click all checkbuttons

Results: approx 6400 results

Here i can provide some "more help for getting the target!" - btw see three detail page:

 

http://www.schulministerium.nrw.de/BP/SchuleSuchen?action=261.2855969084779&SchulAdresseMapDO=116191

http://www.schulministerium.nrw.de/BP/SchuleSuchen?action=261.2855969084779&SchulAdresseMapDO=116270

http://www.schulministerium.nrw.de/BP/SchuleSuchen?action=261.2855969084779&SchulAdresseMapDO=188268

 

btw: we can loop over the results - with a iteration -

 

especially i wanna know: how to do the String concatenation with PHP ; note i wanna do it with curl!

function get_page_data($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
if($output!=false && $_POST['dt']=='No')
   return $output;
curl_close($ch);
}

for($i=1;$i<=$match[1];$i++)
{
$url = "http://www.example.com/page?page={$i}";
$data = get_page_data($url);
if($data) {
   $cleaned = string_between('onload="check();">', '</body>', $data);
   return = stip_tags($cleaned, '<table><tr><td><div>');
}
}

 

any and all help will be  greatly appreciated

 

love to hear  from you

 

best regards

 

 

 

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.