[PHP] curl grabbing a website

2004-09-19 Thread Martin Justra
Hello,

I finally managed to grab the website via curl. Now the problen is that I 
want to have a small piece of that site. I tried to cut that site by 
explode. Now the browser hangs. He says waiting for www.domain.de and 
does nothing.

Here is my listing:
?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 
https://www.example?benutzer=aaapasswort=bbbic=tracking;);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$test = curl_exec($ch);
$teil = explode(!-- rows --, $test);
echo $teil[0];
curl_close($ch);

What did I do wrong ?

Martin


? 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] curl grabbing a website

2004-09-19 Thread Jason Wong
On Sunday 19 September 2004 20:49, Martin Justra wrote:

 I finally managed to grab the website via curl. Now the problen is that I
 want to have a small piece of that site. I tried to cut that site by
 explode. Now the browser hangs. He says waiting for www.domain.de and
 does nothing.

 Here is my listing:
 ?php
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL,
 https://www.example?benutzer=aaapasswort=bbbic=tracking;);
 curl_setopt($ch, CURLOPT_HEADER, 0);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 $test = curl_exec($ch);
 $teil = explode(!-- rows --, $test);
 echo $teil[0];
 curl_close($ch);

What does your php error log say? (manual  Error Handling and Logging 
Functions)

What does your webserver error log say?

If the page that you're grabbing is large, one possibility is that you've run 
out of memory (your php log would tel you this), I suggest you curl_close() 
before explode().

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
There is nothing stranger in a strange land than the stranger who comes
to visit.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php