Help With Google Ads In Lavalair Script

Started on the old forum in September 2007 · view the original in the archive · old links redirect here

39 replies · 3,625 views · started 19 years ago · 1 min read

TL;DR · summary of 39 replies
  • -Google Adsense does not yet support XHTML version, only WML.
  • -AdMob supports both XHTML and WML versions of Google Ads.
  • -Renu4u is trying to make Google Adsense work with XHTML but has not succeeded so far.
  • -Renu4u contacted Google customer care for further assistance.

Written automatically from the replies by a language model on our own server. It can be wrong; the posts below are the source.

4 participants
Regz #21

admob dont give good earning, i have noticed in my account admob is not paying as expected, though adsense pay much better than admob, still i am trying if google ads work with xhtml, though admob is now working fine with xhtml aswell as wml.

Ammm Ok i m using admoda as admob has banned ma account nd Google has also given Makup language as wml but its still not working wid wml .......Renu is google adsense workin wid ua Xhtml? ..

renu4u #22

Ammm Ok i m using admoda as admob has banned ma account nd Google has also given Makup language as wml but its still not working wid wml .......Renu is google adsense workin wid ua Xhtml? ..

nope google is not yet working, but i am trying my best to make it work, have also contacted customer care of google, let see what they say, once i get there reply then only i can proceed further on ad codes.

Guest #23

Well u can use google adsense with no prob in Xhtml version... But its not working on wml... I dont have latest news whether it supports wml... But the prob is not all the browsers specially phone browsers add accordingly and show google ads...

renu4u #24

Well u can use google adsense with no prob in Xhtml version... But its not working on wml... I dont have latest news whether it supports wml... But the prob is not all the browsers specially phone browsers add accordingly and show google ads...

yeah thats what the problem is, google ads dont show at all in xhtml version.

rldowling03 #25

if u wanna use any ads on your site with RW script, if its admob or google ads, just make a new file named 'ads.php' and then get your admob code or google adsense mobile code and then paste it in the ads.php file making sure you leave the php markers in it, ie. <? and ?>

Save it and then where u want ads to show, jus put following

include("ads.php");

But if it is google adsense ads, you MUST not place that inside a paragraph tags. It must be outside of paragraph tags as google has its own paragraph tags and will obstruct the page if it is inside paragrpah tags.

amylee Principal · 1,092 posts #26

admob ads in xhtml work flawlessly on my site so they do work in xhtml

wizard Senior · 493 posts #27
    function admob_ad()
    {
        global $lang;

          /* editable area */
          $mob_mode = 'live'; // change mode from "test" to "live" when you are done testing
          $mob_alternate_link = '[url]http://ads.admob.com/link_list.php?s=a147016f66cd0c1';[/url] // use this to set a default link to appear if AdMob does not return an ad.
    
          /* end editable area */
    
          //used for ad targeting
          $mob_contents = '';
          $mob_ua = urlencode(getenv("HTTP_USER_AGENT"));
          $mob_ip = urlencode($_SERVER['REMOTE_ADDR']);
  
          $mob_m = '';
          if ($mob_mode=='test')
              $mob_m = "&m";

          $mob_url = 'http://ads.admob.com/ad_source.php?s=a147016f66cd0c1&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($this->style == 'WEB')
                    {
                    $this->h3_open("center");
                      if (isset($mob_ad_link) && ($mob_ad_link !=''))
                    {
                              //display AdMob Ad
                        $this->add_link("".$mob_ad_link."","".$mob_ad_text."","alink");
                      }else {
                              //no AdMob ad, display alternate
                        $this->add_link("".$mob_alternate_link."","".$lang['admob_link']."","alink");
                      }
                    $this->h3_close();
            }

                    if($this->style == 'WAP')
                    {

                    $this->start_p("center");
                      if (isset($mob_ad_link) && ($mob_ad_link !=''))
                    {
                              //display AdMob Ad
                        $this->add_link("".$mob_ad_link."","".$mob_ad_text."","alink");
                      }else {
                              //no AdMob ad, display alternate
                        $this->add_link("".$mob_alternate_link."","".$lang['admob_link']."","alink");
                      }
                    $this->end_p();

            }
    }

works for me

renu4u #28
    function admob_ad()
    {
        global $lang;

          /* editable area */
          $mob_mode = 'live'; // change mode from "test" to "live" when you are done testing
          $mob_alternate_link = 'http://ads.admob.com/link_list.php?s=a147016f66cd0c1'; // use this to set a default link to appear if AdMob does not return an ad.
    
          /* end editable area */
    
          //used for ad targeting
          $mob_contents = '';
          $mob_ua = urlencode(getenv("HTTP_USER_AGENT"));
          $mob_ip = urlencode($_SERVER['REMOTE_ADDR']);
  
          $mob_m = '';
          if ($mob_mode=='test')
              $mob_m = "&m";

          $mob_url = 'http://ads.admob.com/ad_source.php?s=a147016f66cd0c1&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($this->style == 'WEB')
                    {
                    $this->h3_open("center");
                      if (isset($mob_ad_link) && ($mob_ad_link !=''))
                    {
                              //display AdMob Ad
                        $this->add_link("".$mob_ad_link."","".$mob_ad_text."","alink");
                      }else {
                              //no AdMob ad, display alternate
                        $this->add_link("".$mob_alternate_link."","".$lang['admob_link']."","alink");
                      }
                    $this->h3_close();
            }

                    if($this->style == 'WAP')
                    {

                    $this->start_p("center");
                      if (isset($mob_ad_link) && ($mob_ad_link !=''))
                    {
                              //display AdMob Ad
                        $this->add_link("".$mob_ad_link."","".$mob_ad_text."","alink");
                      }else {
                              //no AdMob ad, display alternate
                        $this->add_link("".$mob_alternate_link."","".$lang['admob_link']."","alink");
                      }
                    $this->end_p();

            }
    }

works for me

yeah this codes i already have it with me for admob, and it works with wml aswell as xhtml, but the problem is i am not earning that much with admob, i wanted google ads to work, but that is not working on wml aswell as xht l.

subzero Super moderator Fellow · 3,954 posts #29

google staff will not list you or let you use html google ads in xhtml wml i know they check ya site

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

renu4u #30

google staff will not list you or let you use html google ads in xhtml wml i know they check ya site

yeah but they have started a different services for mobile wap users, who can use the php codes in wml aswell as xhtml site, i had even complaint to google adsense, but have not got back reply from them yet, i had emailed them last week.

subzero Super moderator Fellow · 3,954 posts #31

did they give you a script to place ?

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

renu4u #32

yeah they had given the codes for placing it, i do have that code, should i put it here?

subzero Super moderator Fellow · 3,954 posts #33

yeah you can lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

renu4u #34

lol now time 2 sleep, i will give it tomorrow morning.

Regz #35

here is the code for it:-

<?php

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='';
$GLOBALS['google']['client']='pub-9548832607075397';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='wml';
$GLOBALS['google']['output']='wml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
require('[url]http://pagead2.googlesyndication.com/pagead/show_ads.php'[/url]);

?>

i have put this in a file nd included at the place i want to show up adds google says add will take time of 48 hours to show up but they dont show up dunno whts mistake ...

renu4u #36

here is the code for it:-

<?php

$GLOBALS['google']['ad_type']='text';
$GLOBALS['google']['channel']='';
$GLOBALS['google']['client']='pub-9548832607075397';
$GLOBALS['google']['format']='mobile_single';
$GLOBALS['google']['https']=$_SERVER['HTTPS'];
$GLOBALS['google']['host']=$_SERVER['HTTP_HOST'];
$GLOBALS['google']['ip']=$_SERVER['REMOTE_ADDR'];
$GLOBALS['google']['markup']='wml';
$GLOBALS['google']['output']='wml';
$GLOBALS['google']['ref']=$_SERVER['HTTP_REFERER'];
$GLOBALS['google']['url']=$_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
$GLOBALS['google']['useragent']=$_SERVER['HTTP_USER_AGENT'];
require('http://pagead2.googlesyndication.com/pagead/show_ads.php');

?>

i have put this in a file nd included at the place i want to show up adds google says add will take time of 48 hours to show up but they dont show up dunno whts mistake ...

yeah same code i have it on my site too, but they dont work either.

rldowling03 #37

I use googel ads, it works great for me on my wml only site. Make sure you use it how i MENTIONED BEFORE. like 1 page back. It will usually only work when you put includes on the RW script otherwise it will cause errors.

renu4u #38

I use googel ads, it works great for me on my wml only site. Make sure you use it how i MENTIONED BEFORE. like 1 page back. It will usually only work when you put includes on the RW script otherwise it will cause errors.

i had tried using samething what you had told, but it dont work, though this i am trying from past two days, but google ads cannot be seen, i can only see admob ads.

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close