Süper Üye
PHP:
<?php
function pc_ip_adresi() {
$ipadres = '';
if (getenv('HTTP_CLIENT_IP'))
$ipadres = getenv('HTTP_CLIENT_IP');
else if(getenv('HTTP_X_FORWARDED_FOR'))
$ipadres = getenv('HTTP_X_FORWARDED_FOR');
else if(getenv('HTTP_X_FORWARDED'))
$ipadres = getenv('HTTP_X_FORWARDED');
else if(getenv('HTTP_FORWARDED_FOR'))
$ipadres = getenv('HTTP_FORWARDED_FOR');
else if(getenv('HTTP_FORWARDED'))
$ipadres = getenv('HTTP_FORWARDED');
else if(getenv('REMOTE_ADDR'))
$ipadres = getenv('REMOTE_ADDR');
else
$ipadres = getenv('REMOTE_ADDR');
return $ipaddress;
}
$ip = pc_ip_adresi();
function cURL($site)
{
$ip = $_SERVER['REMOTE_ADDR'];
$ch = curl_init();
$hc = $_SERVER['HTTP_USER_AGENT'];
curl_setopt($ch, CURLOPT_REFERER, 'https://www.referersite.com');
curl_setopt($ch, CURLOPT_HTTPHEADER, array("X-Forwarded-For: $ip"));
curl_setopt($ch, CURLOPT_URL, $site);
curl_setopt($ch, CURLOPT_USERAGENT, $hc);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$site = curl_exec($ch);
curl_close($ch);
echo $site;
}
?>
PHP:
<?php
cURL('https://www.cekmekistediginizsite.com');
?>