03-09-2009, 12:49 PM
|
#61 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
|
I posted some code to do this a few posts back:
World of Warcraft Armory xml Grabber with cURL
I'll explain it.
First off i believe you need to send a user-agent through to the armory otherwise it wont return the correct XML file (correct me if I'm wrong) so we need to send out the correct HTTP header.
By far the easiest way to archive this is by creating a stream context and file_get_contents (as its 3rd param accepts a stream context).
I suppose you could do it by opening up a socket on port 80( fsockopen) and passing the headers through ( fputs etc), but its all a bit of a faff.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|