<?php var sentXML:XML = new XML(); sentXML.addRequestHeader("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2"); sentXML.ignoreWhite = true; var wowXML:XML = new XML(); wowXML.ignoreWhite = true; wowXML.onLoad = function(success) { if (!success) { trace("LOAD NO GOOD"); wowData_txt.text = "LOAD NO GOOD"; } else { trace("returned: "+wowXML); wowData_txt.text = wowXML; } } sentXML.sendAndLoad("http://www.wowarmory.com/character-sheet.xml?r=Gorgonnash&n=Leetamus", wowXML, "POST"); ?> Code (markup): Yea, so I get an error when I try to run this script [B]Parse error:[/B] syntax error, unexpected T_VAR Code (markup): ...I don't know what I am doing wrong, This should parse data from the World of Warcraft armory. Someone please fix this! Thanks.
is it really running, before you got that error? Thats not php, i think its javascript.. shown in your first line thats a class variable, and is cannot be independent in procedural method.. up to the last line, thats not how you call a class function.
Yep your right =P just testing you, lol jk...Uh yea, my bad, well I am working on a different script now and this is PHP it uses cURL to fetch the XML file but it doesn't return anything back - <?php $url = 'http://www.wowarmory.com/character-info.xml?r=Twisting+Nether&n=Donike'; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1"); $characterxml = curl_exec($ch); echo $characterxml; #ADDED ?> Code (markup):
isnt it character-sheet.xml insteed of character-info.xml anyway im using this to get wow character datas.. will work only on php5 <?php $url = 'http://www.wowarmory.com/character-sheet.xml?r=Barthilas&n=Emeri'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $page = curl_exec($ch); $xml = new SimpleXMLElement($page); print '<pre>'; print_r($xml); print '</pre>'; ?> PHP:
Hi, I hope you are doing good.I guess this is my 5th reminder mail and hope that you get time or pay attention to read this mail. Earlier you appeared on messenger but now you have vanished from there also.I don't know whether you are going to reply this mail or not. I haven't received my payment of $20 by paypal.I am the one who worked on this site wowarmony, Its 5 months since the work had been delivered to you. This is my only source of bread and butter.I am not a single as you are.I have to feed my family,my kids. I am running short of money.I have to pay charges for the cyber cafe as I dont have PC. Please transfer my fees asap or even half amount first to my paypal account Regards PHP TECHY