proxy'lerin calısıp calısmadıgını bu kod ile kontrol edin ondan sonra kodunuzu tamamlayın.


<?php
error_reporting(0);
ini_set("display_errors", 0);
$proxy = "45.127.248.127";
$proxyport = "5128";
$url = "http://httpbin.org/ip";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_PROXY, $proxy);
curl_setopt($ch, CURLOPT_PROXYPORT, $proxyport);
$response = curl_exec($ch);
echo $response;

?>