Mercurial > hg > ywww
comparison xml/doAmazonRequest.php @ 59:e4c78b3eace7
stop bothering Amazon.co.uk at all
| author | Charlie Root |
|---|---|
| date | Sun, 09 Jun 2019 06:49:35 -0400 |
| parents | 72708ec9c0e6 |
| children |
comparison
equal
deleted
inserted
replaced
| 58:39600878ff93 | 59:e4c78b3eace7 |
|---|---|
| 4 include_once "web.php"; | 4 include_once "web.php"; |
| 5 include "aws_signed_request.php"; | 5 include "aws_signed_request.php"; |
| 6 | 6 |
| 7 function doAmazonRequest($ext, $parameters, $try, $dbl='x', $wantXML=True) | 7 function doAmazonRequest($ext, $parameters, $try, $dbl='x', $wantXML=True) |
| 8 { | 8 { |
| 9 /* Uncomment next line to disable all requests from UK site */ | |
| 10 if ($ext=="co.uk") { | |
| 11 throw new Exception("ThrottledRepeatedly"); | |
| 12 } | |
| 9 global $public_key, $private_key; | 13 global $public_key, $private_key; |
| 10 $requestURI = $_SERVER['REQUEST_URI']; | 14 $requestURI = $_SERVER['REQUEST_URI']; |
| 11 $requestIP = $_SERVER['REMOTE_ADDR']; | 15 $requestIP = $_SERVER['REMOTE_ADDR']; |
| 12 $file_data=$ext; | 16 $file_data=$ext; |
| 13 ksort($parameters); | 17 ksort($parameters); |
