pyramid_raider wrote:
Hi
i started using mobday and i want to create an alternate link for toplist so if no add is available then it display toplist link
here is their php code
echo '<a onclick="_gaq.push(['_trackEvent', 'Outgoing', 'ads.mobday.com', '/clk.php?pubid=1234&ad=adult']);" rel="nofollow" href="http://ads.mobday.com/clk.php?pubid=1234&ad=adult"><img src="http://ads.mobday.com/img.php?pubid=1234&ad=adult" alt="" /></a>';
can anyone help on this code?
just an idea 🙂
<?php
function grab($link){
$crl = curl_init();
curl_setopt ($crl, CURLOPT_URL,$link);
curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
$grab = curl_exec($crl); curl_close($crl);
return $grab;}
$check = grab('http://ads.mobday.com/clk.php?pubid=1234&ad=adult');
if (empty($check)){echo"nothing to show"; /*add your toplist link*/}
else { /*show the add by their function*/
// why to show by their function and not from the cached/curl
//so you won't be banned by them as YOU request the ads by your server!
echo '<a href="http://ads.mobday.com/clk.php?pubid=1234&ad=adult"><img src="http://ads.mobday.com/img.php?pubid=1234&ad=adult" alt="" /></a>'; }
?>
This is ten percent luck, twenty percent skill
Fifteen percent concentrated power of will
Five percent pleasure, fifty percent pain
😂And a hundred percent reason to remember the name!