i donno whether this code is not working or admob have problem..anybody can help me?i use this code but the ads not appear..
it only show Best Web n Wap Community
PHP Code:
function mobads()
{
$mob_mode = "test";
$mob_alternate_link = "<a class=\"link\" href=\"http://wapdesire.com\">Best Web n Wap Community</a>";
$mob_ua = urlencode(getenv("HTTP_USER_AGENT"));
$mob_ip = urlencode($_SERVER['REMOTE_ADDR']);
if ($mob_mode=='live')
$mob_m = "&m";
$mob_url = 'http://ads.admob.com/ad_source.php?s=a147bceef2a4c2a&u='.$mob_ua.'&i='.$mob_ip.$mob_m;
@$mob_ad_serve = fopen($mob_url,'r');
if ($mob_ad_serve)
{
while (!feof($mob_ad_serve))
$mob_contents .= fread($mob_ad_serve,1024);
fclose($mob_ad_serve);
}
$mob_link = explode("><",$mob_contents);
$mob_ad_text = $mob_link[0];
$mob_ad_link = $mob_link[1];
if (isset($mob_ad_link) && ($mob_ad_link !=''))
$ret = "<a class=\"link\" href=\"$mob_ad_link\">$mob_ad_text</a>";
else
$ret = $mob_alternate_link;
return $ret;
}
Comment