Combine admob with other ad networks

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unfathomable
    replied
    Its very easy. You have to put the adcode of the other network you wish to use in a function like otherad() ... eg. Instead of:

    echo $contents;

    Use

    return $contents; // In THE function.

    after setting this, in admob's code, at the end, check like this:

    if(strstr($ad_contents, 'href')) return $ad_contents;
    else return otherad();

    Leave a comment:


  • MelissaDaisy99
    replied
    Great post! It's very nice. Thank you so much for your post.

    Leave a comment:


  • slowy
    replied
    ok thanks.
    check ur pm and reply

    Leave a comment:


  • khan
    replied
    Don't use like
    PHP Code:
    $mob_alternate_link = include("mobgold1.php"); 
    you should use the core function of mobgold like
    PHP Code:
    mobgold(); 
    coz if u use like include("???????"); it will aslo parse a echo. thats why it showing two ads I guess.

    Leave a comment:


  • slowy
    replied
    if i m including a php in alternative link then why both ads r showing
    PHP Code:
    <?
    #ADMOB USES MODIFIED FOR USING ANOTHER COMPANYS AD WHEN ADMOB AD ISNT SHOWING.#
    function mobads()
    {
    $mob_mode = "live";
    $admobcode = "0000000000000000";
    $mob_alternate_link = include("mobgold1.php");
    $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='.$admobcode.'&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='' href='$mob_ad_link'>$mob_ad_text</a><br />";
    else
    $ret = $mob_alternate_link;
    return $ret;
    }
    echo mobads();
    ?>

    Leave a comment:


  • slowy
    replied
    Originally posted by khan View Post
    if they found you that u are changing link name, your a/c may be banned. jara sambhalke bro...
    ya bro,sambhal ke hi karunga,thanks ;)

    Leave a comment:


  • khan
    replied
    Originally posted by slowy View Post
    if i m changing admob's text link like this
    PHP Code:
    $ret "<a class='' href='$mob_ad_link'>FREE MOBILE DOWNLOADS</a><br />"
    then both ads are showing admob's ads and alternative ad
    and admob's fill rate increased
    y is it so????
    if they found you that u are changing link name, your a/c may be banned. jara sambhalke bro...

    Leave a comment:


  • slowy
    replied
    if i m changing admob's text link like this
    PHP Code:
    $ret "<a class='' href='$mob_ad_link'>FREE MOBILE DOWNLOADS</a><br />"
    then both ads are showing admob's ads and alternative ad
    and admob's fill rate increased
    y is it so????

    Leave a comment:


  • Nega
    replied
    Originally posted by Petar Raznatovic View Post
    I think you didnt understand my question I wanted to ask is it against their rules to use another ad network parallel to their Thanks.
    No, It is not against their rules.

    Leave a comment:


  • khan
    replied
    Originally posted by slowy View Post
    code is working perfectly ;)
    if i want to use another ad network like mobads3 then what should be the code?
    add another variable for mobads3(); like
    PHP Code:
    $mob_another_adsmobads3(); 
    then change the last couple lines to
    PHP Code:
    else if
    $ret $mob_alternate_link;
    else 
    $ret $mob_another_ads;
    return 
    $ret

    Leave a comment:


  • slowy
    replied
    code is working perfectly ;)
    if i want to use another ad network like mobads3 then what should be the code?

    Leave a comment:


  • khan
    replied
    Originally posted by Petar Raznatovic View Post
    I think you didnt understand my question I wanted to ask is it against their rules to use another ad network parallel to their Thanks.
    No.........................

    Leave a comment:


  • Petar Raznatovic
    replied
    Combine admob with other ad networks

    I think you didnt understand my question I wanted to ask is it against their rules to use another ad network parallel to their Thanks.

    Leave a comment:


  • khan
    replied
    Originally posted by CreativityKills View Post
    the code doesnt seem to work, always shows alt link o.O
    then you may change the admob link to latest admob link to http://r.admob.com/ad_source.php instead of http://ads.admob.php/ad_source.php.

    Btw, it works with me. may be your fill rate isnt high enough. though u can change to assure.

    Leave a comment:


  • CreativityKills
    replied
    the code doesnt seem to work, always shows alt link o.O

    Leave a comment:

Working...
X