0

I tried to use use the Steam Web API to get Skin Prices for PUBG Skins. Yesterday it worked well but today the request returns nothing. Not even the "Too many Requests" Error. Just nothing. I tried everything. With "file_get_contents" and with a curl request

function getRequest($url, $refer = "", $timeout = 10)
{
    $ssl = stripos($url,'https://') === 0 ? true : false;
    $curlObj = curl_init();
    $options = [
        CURLOPT_URL => $url,
        CURLOPT_RETURNTRANSFER => 1,
        CURLOPT_FOLLOWLOCATION => 1,
        CURLOPT_AUTOREFERER => 1,
        CURLOPT_USERAGENT => 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)',
        CURLOPT_TIMEOUT => $timeout,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_0,
        CURLOPT_HTTPHEADER => ['Expect:'],
        CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
    ];
    if ($refer) {
        $options[CURLOPT_REFERER] = $refer;
    }
    if ($ssl) {
        //support https
        $options[CURLOPT_SSL_VERIFYHOST] = false;
        $options[CURLOPT_SSL_VERIFYPEER] = false;
    }
    curl_setopt_array($curlObj, $options);
    $returnData = curl_exec($curlObj);
    if (curl_errno($curlObj)) {
        //error message
        $returnData = curl_error($curlObj);
    }
    curl_close($curlObj);
    return $returnData;
}

I know that it is really hart to work with the API but somehow it has to work. BTW when I request the URL from my local PC it is working well. Maybe it is something of a IP ban. But shouldn't it return at least a error message?

ekad
  • 14,436
  • 26
  • 44
  • 46
Elias
  • 89
  • 1
  • 3
  • 10
  • The Web API has a 200 requests in 5 min limit. Too many requests within a few seconds also get rejected regularly. I think your hunch with the IP ban is correct. – EliteRaceElephant Mar 01 '18 at 23:26
  • It is working now. I think i got banned for about 12 hours, but now i get the normal json output. My work around without using other IPs is to crawl only 8 Items at a time and start a request every hour. That is working fine! – Elias Mar 02 '18 at 08:39

0 Answers0