Home »
Imported messages »
comp.lang.php »
URL-String-concatenation within a Loop in cURL: [a easy one]
Re: URL-String-concatenation within a Loop in cURL: [a easy one] [message #170786 is a reply to message #170785] |
Thu, 25 November 2010 22:21 |
Jerry Stuckle
Messages: 2598 Registered: September 2010
Karma:
|
Senior Member |
|
|
On 11/25/2010 4:26 PM, matze wrote:
> 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!
>
> can i do like so
>
> 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
>
> martin
What's wrong with Michael Fesser's response to this same question from
you 3 hours ago?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
|
|
|
Goto Forum:
Current Time: Wed Dec 18 17:15:49 GMT 2024
Total time taken to generate the page: 0.05311 seconds