Mercurial > hg > ywww
diff xml/getAmazonInfo.php @ 13:b78209a5fba1
Merge
| author | Rob Boland <robert@metail.co.uk> |
|---|---|
| date | Sat, 18 Feb 2017 15:18:47 +0000 |
| parents | c9ebf871114b |
| children | 385ddd7c4b55 ae1459564f66 77ff181476b8 |
line wrap: on
line diff
--- a/xml/getAmazonInfo.php Fri Feb 17 15:24:17 2017 +0000 +++ b/xml/getAmazonInfo.php Sat Feb 18 15:18:47 2017 +0000 @@ -94,8 +94,6 @@ $url=aws_signed_request($ext,$parameters,$public_key,$private_key); //echo $url; - file_put_contents('/var/ywww/debug/phpDebug',"parms: $go". - print_r($parameters,TRUE)."\n",FILE_APPEND); $crl = curl_init(); $timeout = 5; curl_setopt ($crl, CURLOPT_URL,$url); @@ -117,12 +115,18 @@ $xml = new SimpleXMLElement($output); $resName=$xml->getName(); $code=$xml->Error->Code; - file_put_contents('/var/ywww/debug/phpDebug',"Losing: $resName, ". - $code."\n",FILE_APPEND); + file_put_contents('/var/ywww/debug/phpDebug',"Losing: $resName, $code\n",FILE_APPEND); if ($code=='RequestThrottled') { usleep(200000); // Try to reduce throttling until we get a // principled solution in place } + else { + file_put_contents('/var/ywww/debug/phpDebug',"parms: $go\n". + print_r($parameters,TRUE)."\n",FILE_APPEND); + if ($code=="") { + file_put_contents('/var/ywww/debug/phpDebug',"error elt:\n$output\n",FILE_APPEND); + } + } } else { $xml = new SimpleXMLElement($output);
