Mercurial > hg > ywww
diff xml/getAmazonInfo.php @ 9:232deb0b066a
tidy up debugging, only show parms on non-throttled error
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Sat, 18 Feb 2017 11:38:36 +0000 |
parents | 1dfe64e365a0 |
children | 5aa24c984a3b |
line wrap: on
line diff
--- a/xml/getAmazonInfo.php Fri Feb 17 15:22:53 2017 +0000 +++ b/xml/getAmazonInfo.php Sat Feb 18 11:38:36 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,15 @@ $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); + } } else { $xml = new SimpleXMLElement($output);