AZA, Вот пример на
curl, проверил работает
Код
<?php
$myCurl = curl_init();
curl_setopt_array($myCurl, array(
CURLOPT_URL => 'https://api.steampowered.com/ISteamRemoteStorage/GetCollectionDetails/v1/',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(array("collectioncount"=>"1","publishedfileids[0]"=>"1"))
));
$response = curl_exec($myCurl);
curl_close($myCurl);
echo "Ответ на Ваш запрос: ".$response;
Вот на
file_get_contentsКод
$url = 'https://api.steampowered.com/ISteamRemoteStorage/GetCollectionDetails/v1/';
$params = array(
'collectioncount' => '1',
'publishedfileids[0]' => '1'
);
$result = file_get_contents($url, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'content' => http_build_query($params)
)
)));
echo $result;