01-07-2009, 07:16 PM
|
#13 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
An alternative to using curl would be:
PHP Code:
/* $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 15); curl_setopt ($ch, CURLOPT_USERAGENT, self::BROWSER);
$url_string = curl_exec($ch); curl_close($ch);*/ $opts = array( 'http'=>array( 'method'=>"GET", 'header'=>"User-Agent: ".self::BROWSER." \r\n" ) ); $url_string = file_get_contents($url,false,stream_context_create($opts)); return simplexml_load_string($url_string);
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|