not work in my host any other idea plz
http://nepalwap.com/ad/go/?uid=4&adult=on&mode=live
working bt error showing in php adcode. Php adcode link http://nepalwap.com/ad/ad.php
my php ad code
http://nepalwap.com/ad/go/?uid=4&adult=on&mode=live
working bt error showing in php adcode. Php adcode link http://nepalwap.com/ad/ad.php
my php ad code
PHP Code:
<?php
/*
Do not change this code without prior permission from NepalWAP ad Network!
If You Do So Then Your Account Will Be Suspended Without Any Warning !!!
*/
function show_nepalwap_ad()
{ $ua = $_SERVER["HTTP_USER_AGENT"];
$ip = isset ($_SERVER["HTTP_X_FORWARDED_FOR"]) ?
$_SERVER["HTTP_X_FORWARDED_FOR"] :
$_SERVER["REMOTE_ADDR"];
if(strstr($ip, ','))
{
$ips = explode(',', $ip);
$ip = $ips[0];
}
$params = 'uid='.urlencode('4'); // set your uniqe id
$params .= '&HTTP_USER_AGENT='.urlencode($ua);
$params .= '&REMOTE_ADDR='.urlencode($ip);
$params .= '&adult='.urlencode('1'); // set 1 for on value or 0 for off value
$params .= '&mode='.urlencode('live'); // set mode 'live' to show ads 'test' to disable ads
// send ad request
$url = "http://nepalwap.com/ad/go/?".$params;
$timeout = 5;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$html = curl_exec($ch);
curl_close($ch);
if($html !== false) return $html;
else return "";
}
?>
<?php
// copy this snippet elsewhere on your page for display more of ads
echo show_nepalwap_ad();
?>
Comment