08-25-2008, 02:12 PM
|
#2 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
Thanks, I wrote something similar not long ago for a guild website i was developing. In my case I used armory to populate the guild roster in the DB.
One thing i did notice about your code:
PHP Code:
$url_string = curl_exec($ch); return simplexml_load_string($url_string); curl_close($ch);
The curl_close is defined after the return, thus it is never fired and resources never freed.
This is the correct code:
PHP Code:
$url_string = curl_exec($ch); curl_close($ch);
return simplexml_load_string($url_string);
Also
PHP Code:
curl_setopt ($ch, CURLOPT_USERAGENT, armory::BROWSER);
may aswell be:
PHP Code:
curl_setopt ($ch, CURLOPT_USERAGENT, self::BROWSER);
Just in case you wish to change the name of your class.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|