Arkadaşlar Selam.
bir api linkindeki verileri çekmeye çalışıyorum. bir kaç gün öncesine kadar çalışıyorken sunucu ip değişiminden sonra artık çalışmamaya başladı.
Ekrana bastıramıyorum bir türlü.
file_get_contents te verdiği hata: failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /home/
api linki şu :
https://public-api.solscan.io/accoun...VhAW5Q5pge4j1;
Not: Sunucuda allow_url_fopen açık;
openSsl açık
cURL ile çektiğim kodlar şu:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://public-api.solscan.io/account/tokens?account=5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
file_get_contents ile çektiğim kodlarım şu:
$file = file_get_contents("https://public-api.solscan.io/account/tokens?account=5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1");
$file = json_decode($file, 1);
echo @$count=count($file);
echo "<pre>";
var_dump($file);konu hakkında bilgisi olan arkadaşlarımdan yardımlarını rica ediyorum.