Jump to content

Haighy

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Haighy

  • Rank
    Newbie
  1. ......or could it be my IE interpreting it better than my host server because i see </ a7 voucherTypeId> when i do a print as mentioned
  2. Hi XSLT S I dont think it is that - please check out the source xmlhttp://api.tradedoubler.com/1.0/vouchers.XML;voucherTypeId=1?dateOutputFormat=iso8601?token=248487FBCA39B156B569D8F698C83FF27503CE8F looks ok to me
  3. using htmlspecialchars: <voucherList><voucher><id>9706</id><programId>898</programId><programName>Tesco.com</programName><code>TD-PRGM</code><updateDate>1356965680759</updateDate><startDate>1356908400000</startDate><endDate>1357513199999</endDate><title>5 off £30 on any Pre Order Games</title><shortDescription>5 off £30 on any Pre Order Games until 06.01.13 using code TD - PRGM (Offer ends 06.01.13. Excludes </shortDescription><description>5 off £30 on any Pre Order Gam
  4. Bumping this up as I really need the help here
  5. i have noticed that -1;-1;-1 and 3ff appears regularly - is this decoded xml elements?
  6. [/code] ok here is everything url: http://api.tradedoubler.com/1.0/vouchers.XML;voucherTypeId=1?dateOutputFormat=iso8601?token=248487FBCA39B156B569D8F698C83FF27503CE8F sample from print $TDResponse Tesco.comXMASTREAT13552454444571355180400000135699479999915% off F&F Limited Edition collection15% off F&F Limited Edition collection1http://clk.tradedoubler.com/click?a(2075091)p(898)ttid(13)url(http://www.clothingattesco.com/)falsehttp://www.clothingattesco.com/293718710hmvWQ2013464115928101346364000000135699479999920% off selected pre-orders20% off when yo 3ff u pre-order any one of t
  7. I do get data so that's what is confusing me. It seems that the XML parser can't interpret it though
  8. the more i read about this, it must be something to do with the decoding. I dont want to convert to JSON at this point. Does anyone have any ideas?
  9. i have compared the $TDResponse between my test pc and the web host and both look identical - therefore am still puzzled why one works and not the other. could be something to do with the xml header? <?xml version="1.0"?> i have similar xml structures which are correctly parsed (using the same technic) but have a slightly different xml header?xml version="1.0" encoding="UTF-8"?>
  10. if i do print $TDResponse - no xml structure is shown - is that expected? never checked before
  11. i also ran $TDurl in IE <?xml version="1.0"?>-<voucherList>-<voucher><id>9142</id><programId>898</programId><programName>Tesco.com</programName><code>XMASTREAT</code><updateDate>1355245444457</updateDate><startDate>1355180400000</startDate><endDate>1356994799999</endDate><title>15% off F&F Limited Edition</title><shortDescription>15% off F&F Limited Edition collection</shortDescription><description>15% off F&F Limited Edition collection</descripti
  12. Hi All I have a bizzar issue which is driving me nuts. I was running a php server on my pc to test my code with no issues - now moved it to the host server and get this issue when try to parse xml: Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 1: parser error : Start tag expected, '<' not found in /websites/123reg/LinuxPackage22/tr/ad/in/tradingbay.co/public_html/Lib/Functions.php on line 154 here is my code: $TDurl = "http://api.tradedoubler.com".$Version.$module.$Format.$TDParams.$Token;print $TDurl;$TDResponse = @file_get_contents($TDurl);$TDParsed_Xml
  13. actually have found the solution thanks to your kind assistence i used this inside the foreach $NodeCount = $current ->count(); thanks again
  14. ahh sorry - I understand now. I did not see this line in your example $count = $ParsedXml->count(); Is it possible to put this count statement inside the foreach loop? each Product could have a different number of child nodes
  15. it is a statement so that count surely would not work as i don't know how many child nodes exist. the number is dynamic
×
×
  • Create New...