Google

Sunday, September 30, 2007

Google is indexing their Mobile Adsense Advertisements

As my mobile site is starting to get indexed, I am a little concerned that the Google Mobile Adsense is appearing in the search results. I have the ads on the top of the page which is great SEO & SEM for the advertisers, especially for the Ads that are relying on phone numbers as point of contact.



What currently happens is when a visitor hits the site, it is then hit by the google bot:

crawl-66-249-73-205.googlebot.com
User-Agent : Nokia6820/2.0 (4.83) Profile/MIDP-1.0 Configuration/CLDC-1.0 (compatible; Mediapartners-Google/2.1; +http://www.google.com/bot.html)


I guess this is checking the Ads or something, so I don’t think it would be a good idea to not show the Ads for the Google bot, but what am I meant to do? Is any body else getting this problem?

I have already contacted Google over the current issue with the Yahoo bot hitting the site and then having it count as page impressions.

Now This?

Other Post's you might be interested in:
AdSense for Mobile and the Page Impressions Problem

How to identify a mobile phone hitting your web site

I have seen a lot of mobile headers, and here are just a few …

Blackberry
[Profile] => http://www.blackberry.net/go/mobile/profiles/uaprof/7290/4.0.0.rdf
[User-Agent] => BlackBerry7290/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/5.1.2.5
[Accept] => application/vnd.rim.html, text/html, text/plain, application/xhtml+xml, application/vnd.wap.xhtml+xml, application/vnd.wap.wml+xml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, image/gif;anim=1, image/jpg, image/vnd.wap.wbmp, image/png, image/vnd.rim.png, image/jpeg, image/pjpeg, application/smil, application/x-vnd.rim.pme, application/x-vnd.rim.pme.b, image/pme, application/vnd.oma.drm.message, audio/midi, audio/x-midi, audio/mid, application/x-javascript, application/vnd.rim.jscriptc;v=0-8-8, text/css;media=handheld, application/vnd.wap.multipart.mixed, application/vnd.wap.multipart.alternative, application/vnd.wap.multipart.related, multipart/mixed, multipart/alternative, multipart/related, text/vnd.sun.j2me.app-descriptor, application/java-archive, application/vnd.rim.proxyconfig, application/vnd.wap.coc, application/vnd.wap.slc, application/vnd.wap.sic, text/vnd.wap.co, text/vnd.wap.sl, text/vnd.wap.si, application/x-x509-ca-cert, application/x-x509-email-cert, application/x-x509-server-cert, application/x-x509-user-cert, application/vnd.wap.signed-certificate, application/vnd.wap.cert-response, application/vnd.wap.wtls-ca-certificate, image/bmp, image/vnd.wap.wbmp, text/x-wap.wml, text/vnd.wap.wml, text/x-hdml, text/html, text/vnd.wap.wmlscript, text/vnd.wap.co, text/vnd.wap.si, text/vnd.wap.sl, */*

Siemens SK65
[user-agent] => SIE-SK6R/46 UP.Browser/7.0.2.2.d.1.100(GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1
[x-wap-profile] => "http://communication-market.siemens.de/portal/UAProf/UAP.aspx?device=SK6R&v=46"

SonyEricsson K600i
[Accept] => application/vnd.wap.xhtml+xml, application/vnd.wap.wmlc, application/xhtml+xml, image/gif, */*; q=0.9
[Accept-Charset] => utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS
[User-Agent] => SonyEricssonK600i/R2K/SN356573000470498 Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1
[x-wap-profile] => "http://wap.sonyericsson.com/UAprof/K600iR101.xml"
[Max-Forwards] => 10
[X-Forwarded-For] => xxx.xxx.xxx.xxx

SonyEricsson K750i
[accept] => application/vnd.wap.xhtml+xml, application/vnd.wap.wml, application/xhtml+xml, multipart/mixed, application/vnd.wap.multipart.mixed, image/gif, */*; q=0.9
[accept-charset] => utf-8, utf-16, iso-8859-1, iso-10646-ucs-2, Shift_JIS
[accept-language] => en
[user-agent] => SonyEricssonK750i/R1L Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1
[x-wap-profile] => "http://wap.sonyericsson.com/UAprof/K750iR101.xml"

Nokia 6030
[Host] => 000.000.000.000
[accept] => application/vnd.wap.wmlscriptc, text/vnd.wap.wml, application/vnd.wap.xhtml+xml, application/xhtml+xml, text/html, multipart/mixed, */*
[accept-charset] => ISO-8859-1, US-ASCII, UTF-8; Q=0.8, ISO-10646-UCS-2; Q=0.6
[accept-encoding] => gzip, deflate
[user-agent] => Nokia6030/2.0 (y3.32) Profile/MIDP-2.0 Configuration/CLDC-1.1
[x-wap-profile] => "http://nds1.nds.nokia.com/uaprof/N6030r100.xml"

Nokia 7250i
[user-agent] => Nokia7250I/1.0 (3.22) Profile/MIDP-1.0 Configuration/CLDC-1.0
[x-wap.tod-coded] => Thu, 01 Jan 1970 00:00:00 GMT
[if-modified-since] => Tue, 1 Jan 2007 01:02:03 GMT
[accept] => text/css, text/html, application/vnd.wap.xhtml+xml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, application/vnd.wap.wbxml, application/xhtml+xml, application/wml+xml, application/vnd.wap.xhtml+xml, application/x-wap-prov.browser-settings, application/x-nokia.settings, text/x-vcard, text/x-vcalendar, application/vnd.wap.wtls-ca-certificate, application/vnd.wap.hashed-certificate, application/vnd.wap.signed-certificate, application/vnd.wap.cert-response, application/vnd.wap.sic, application/vnd.wap.slc, application/x-wap-prov.browser-bookmarks, text/x-co-desc, application/vnd.oma.drm.message, image/gif, image/jpeg, image/jpg, image/bmp, image/png, image/vnd.wap.wbmp, image/vnd.nok-wallpaper, image/vnd-nok-camera-snap, image/vnd-nok-camera-snsp, application/vnd.wap.mms-message, text/vnd.sun.j2me.app-descriptor, application/vnd.nokia.ringing-tone, audio/midi, audio/mid, audio/x-midi, audio/x-mid, audio/sp-midi, application/java, image/vnd.nok-oplogo-color, application/java-archive, application/x-java-archive, text/vnd.wap.wml, text/vnd.wap.wmlscript, */*;q=0.001
[accept-charset] => iso-8859-1, utf-8;q=0.800, us-ascii;q=0.700, iso-10646-ucs-2;q=0.600, *;q=0.001


What is the easiest way to identify if its an actual mobile hitting your browser? Well to me it was checking the user-agent contains MIDP. Eg: Profile/MIDP-2.0. I used to think checking for MIDP-2.0 was the way to go. All the new phones are identified by it, and in most cases it would mean it was colour, and had java etc. But It wasn’t until the google bot hit my site that I now just check for MIDP

Eg: The Google Bot User Agent String
Nokia6820/2.0 (4.83) Profile/MIDP-1.0 Configuration/CLDC-1.0 
(compatible; Mediapartners-Google/2.1; +http://www.google.com/bot.html)

A small snippet of PHP code I use to check if it’s a mobile :
if (stristr($_SERVER['HTTP_USER_AGENT'], "MIDP")){
$mobile=true;
}


And another piece of code I use for the mobile phones is the HTTP_ACCEPT header
if(stristr($_SERVER["HTTP_ACCEPT"], "application/xhtml+xml")){
header("Content-type: application/xhtml+xml");
}else {
header("Content-type: text/html");
}

Now it must be my lucky day as now Google is indexing my mobile site even though my webmaster sitemaps.xml are submitted as Mobile/XHTML

When is a file.rss not an actual .rss file?

When the Header sent back is Content-Type: text/html; charset=utf-8

Using Live HTTP Headers Firefox Add On https://addons.mozilla.org/en-US/firefox/addon/3829

I could see Apache was treating my filename.rss files as normal text. Modifying the .htaccess file to treat the .rss files correctly, I made the following modification :

# Set up correct header for the rss files


AddType application/rss+xml .rss

Now checking out the reply header, it now sends back the correct header

Content-Type: application/rss+xml

Now my problem is checking with Google using the allinurl and site filters I can see almost 5000+ are indexed. I am not sure if I should be a little concerned, as I would rather search engine traffic go to the site, rather than the rss feed. Also duplicate content could become an issue.

I would of thought Google would of known not to add a rss feed to their main search results, as the files began with :
<?xml version='1.0'?>
<rss version='2.0'>
<channel>
<title>blah...</title>
....


So now I guess only time will tell if I get more of my RSS files indexed, or not.

To find out how many files I had listed, I used to following search (replaced sitename of course)
allinurl:www.sitename.com site:www.sitename.com .rss

Tuesday, September 25, 2007

The launch of a Mobile Site

I have always liked the idea of a mobile site, and my previous job I created a great Mobile version of their existing site. It had logins, pretty colors, anchor links, mobile access key links so you could press a button to activate links. It wasn’t until the launch of Inside AdSense: Here comes mobile that I have even considered porting one of my biggest sites to a mobile version.

In a perfect world you can have one style sheet for a browser, and a mobile style sheet for a mobile. But in reality it just doesn’t work. The amount of content for a phone has to be considered, visual real estate is also another. One thing is users are going to have to click a lot on a mobile phone to view the content. So you got to make what gets shown count.

Some problems I have seen is clicking down on a phone goes to the next link, so if you have lots of links, the point of link focus can go all over the place. I liked the idea of “down arrows” that will take you to the next section of the page, I try to keep the pages shot (like 10 cms long).

So now that I created the mobile site, how do I SEO it? How do I promote it? Should I worry about it being indexed in the main Google site, thus causing a potential duplicate content problem?

First things first : Create the site maps.
Problem is I did this for almost 30,000 “Main” pages. Each of these pages can have between 1 to almost 300 other links. That’s a lot of pages and even though the html contains :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


My HTTP headers are sending
Content-Type: text/html; charset=utf-8

This could be a problem, so I need to check if it can accept the application/xhtml+xml header and send that.
I really should fix this, and can see how I get crawled.

Next step is the site needs a site map link, its not really for the users, but more of the crawlers. The pages should really leak to others.

Next step is to make a link to the site map in the robots.txt file
Next is to submit them to the Yahoo Site Explorer and Google Webmaster tools.

I did this about 4 days ago, and in today’s logs I have noticed :

cr06.wap.search.mud.yahoo.com
Nokia6682/2.0 (3.01.1) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0
configuration/CLDC-1.1 UP.Link/6.3.0.0.0 (compatible;YahooSeeker/M1A1-R2D2;
http://help.yahoo.com/help/us/ysearch/crawling/crawling-01.html)

crawl-66-249-73-205.googlebot.com
Nokia6820/2.0 (4.83) Profile/MIDP-1.0 Configuration/CLDC-1.0 (compatible;
Mediapartners-Google/2.1; +http://www.google.com/bot.html)


Now spending all this time creating 2 versions of a site, you get to see potential problems

Mobile Web developers irate at Vodafone move
http://wireless.itworld.com/4269/070924vodafone/page_1.html

Vodafone UK is abusing its position
http://wurfl.sourceforge.net/vodafonerant/

This is all I need,
And the fact that with the Google Adsense on the mobile, is the site has to hit google for the link data (only after allowing fopen (gulp)) Then the page gets displayed, and then Google ad bot hits the site.

As for Google Mobile Adsense : Page impressions, it counts the yahoo bot hitting your site. So if you see a big spike there, now you know.

Well time to monitor the logs and wait for the mobile feedback.

To block Webaroo or not?

I am in the process of releasing a mobile version of one of my web sites. So to get an idea of what browsers are hitting my site, Using Drupal CMS I installed the Browse Cap module. I noticed that Webaroo is hitting my site almost as much as the Google Bot. Running a web site I don’t mind Google hitting a site so much, because you get the traffic back from their search engine. The problem I see with Webaroo is that its basically 1 user grabbing all the traffic. Running the site on a shared host, I have to take into account where all my resources go.

Checking the Webaroo site I couldn’t find my site appear in any of the search results, so the question is “Should I block Webaroo or not

Some searching on Webaroo mentioned them inserting their own Ads, which I am not a big fan off if they are simply caching the site, but this is what really concerned me, over at betanews :
http://fileforum.betanews.com/detail/Webaroo/1154707595/1

One last thing: I rated this a 1 because Webaroo secretly runs a BitTorrent client on your computer. I've read all the license agreement and terms of service, privacy policy, FAQ, and everything else in the software and on the web site, and NOWHERE do they disclose that you will be contributing your upload bandwidth while downloading.


Now that’s a big concern to me just as a user. So it would be great to hear what other web site administrators are dealing with Webaroo.

Monday, September 24, 2007

JavaScript Select Box Filter

Today’s link of the “Oh I don’t want to spend all day coding this stuff myself” day goes to the Matt Kruse’s JavaScript Toolbox.
http://www.javascripttoolbox.com/lib/selectbox/index.php

What I need is some JavaScript that allows me to select options from a multi option select box.
Checking out the examples and the “Selecting Options By Regular Expression” is exactly what I am after.

The Site has many other great resources I think I will find some use for, as this site would of probably got lost in my del.icio.us book marks.

Now the problem I had was with a Multiple Select box it uses an array, like this example.


....
<select name="selectids[]" size="10" multiple="multiple">
<option value="1" selected="selected">Value 1</option>
<option value="2" selected="selected">Value 2</option>
</select>
....


Now I couldn't just pass the value "selectids" as that doesn't exist, so you need to use array notation instead.
eg : document.forms[0]['selectids[]']

So this is the example I now used


<script type="text/javascript" src="/selectbox.js"></script>
Select Matching Options: <input type="text" name="pattern1" value="^\w+$">
<input type="button"
name="selectmatching1"
value="Select"
onClick="Selectbox.selectOptions(document.forms[0]['selectids[]'],this.form.pattern1.value)">
<br>
Select ONLY Matching Options: <input type="text" name="pattern2" value="^\w+$">
<input type="button"
name="selectmatching2"
value="Select"
onClick="Selectbox.selectOnlyOptions(document.forms[0]['selectids[]'],this.form.pattern2.value)">
<br>
Un-Select Matching Options: <input type="text" name="pattern3" value="^\w+$">
<input type="button"
name="selectmatching3"
value="Select"
onClick="Selectbox.unselectOptions(document.forms[0]['selectids[]'],this.form.pattern3.value)">
<br>
<input type="button"
name="selectall"
value="Select All Options"
onClick="Selectbox.selectAllOptions(document.forms[0]['selectids[]'])">
<br>


Which now works the way I want it to.

Thursday, September 20, 2007

All we need is another 20+ Must have Firefox extensions

I get asked a lot which Firefox extensions I use. OK not really, but I just needed to keep them as a list, so I know what to install next time I have to work on a PC with only IE installed.

All we need is another "20+ Must have Firefox extensions list for the Web Developer". With Forecastfox making the list it cannot be too serious. Also are they still called extensions or Add-ons?


Name of ExtensionImageWhy I use it
Adblock PlusAdblock PlusYes I do block ads. There I said it. This was one of the extensions that first got me using firefox.
Adblock Plus: Element Hiding HelperAdblock Plus: Element Hiding HelperLets me hide more. A companion extension for Adblock Plus
ColorfulTabsColorfulTabsI usually have open 10+ tabs in Firefox, so the Colour makes the Tabs a little easier to read.
ColorZillaColorZillaGives me the colour RGB and HEX values.
del.icio.us buttonsdel.icio.us buttonsI am now hooked on bookmarking and tags. This lets me to easily tag pages, and bookmark sites that I probably wont ever visit again.
FasterfoxFasterfoxI don't use this as much as I used to, but the timer it has shows me how long the pages take to load.
FirebugFirebugI don't leave home without this one. It is great for trouble shotting web site problems. This is usually always open on in my Dual Montior set up.
Font FinderFont FinderUsed to help my identify which fonts a web site uses. very helpfull it it is hidden deep in the CSS.
Force Content TypeForce Content TypeI use this when I want to view an XML file in the browser, but the site is sending me the wrong headers
ForecastfoxForecastfoxI like to know what the weather is outside. Sure I might not actually go outside, but its handy to know that Melbourne is Mostly Cloudy and 11 degrees.
GreasemonkeyGreasemonkeyI use this a for a couple of sites
Html ValidatorHtml ValidatorAnother one I don't leave home without this one. Although now I am getting to the point where Warnings are fine, its the red cross I need to worry about.
IE TabIE TabI have it, but don't use it. Generally I just open up IE itself. One of the advantages of a dual monitor set up.
Javascript Debugger its makes debugging Javascript that little bit easier.
Live HTTP Headers I need to see what HTTP headers are.
MeasureItMeasureItSure there is a Ruler in the web developer extension (Miscellaneous -> Display Ruler) But I like this one.
MinimizeToTrayMinimizeToTrayI have it installed, but I use Power Menu now. So I guess I should really disable this one.
PDF DownloadPDF DownloadBecause sometimes it is easier to download the PDF
Session ManagerSession ManagerIn a perfect world I wouldn't need this, but on the odd occasion my brower does crash, this lets me resume where I left off.
Stylish Great for testing out a style sheet, without actually uploading. Not used much recently, but was a great tool to move the Digg page around when the site changed layouts
Tab Mix PlusTab Mix PlusGives me a little more options for the Tabs.
User Agent SwitcherUser Agent SwitcherYes I used this to make my browser look like the iPhone a couple months before it was released, and I hit all the Apple sites I could find. Sorry to all those who got excited when they saw (Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A537a Safari/418.4) in their logs.

Now I use it to test out my mobile / wap pages.
Web DeveloperWeb DeveloperThis is the first extension I install. I mainly use the "Information -> View Color Information" on web sites to figure out what my homes paint colour scheme should be.
wmlbrowserwmlbrowserLets me browse wml (Wap) sites in my browser. Really need to use this with User Agent Switcher for full effect.
XHTML Mobile Profile Another tool to help test out Mobile Phone designed web sites.
YSlowYSlowGreat new tool from the folks at Yahoo. Used with Firebug. Not too sure if I like it yet, as it just means I know have proof my web sites are too slow, have too many javascript files and are sites get Ranked "F". It really should grade on the curve.


About the Author: I run the some small websites in my spare time. I started doing web development when geocities was cool, hotmail didn't belong to microsoft, having an ICQ number 3096077 was cool, and used Netscape Gold for its HTML editing capabilities.

Wednesday, September 05, 2007

RSS Feeds that make me lazy

Some are work related, some are complete time wasters. The Off beat list helps me keep ahead of the digg crowd. So enjoy, but don't blame me if your work productivity starts to go down hill.

Tech RSS Feeds


del.icio.us/popular
http://del.icio.us/rss/popular/

digg
http://digg.com/rss/index.xml

DZone: latest front page
http://www.dzone.com/feed/frontpage/rss.xml

reddit.com: what's new online
http://reddit.com/.rss

Slashdot
http://rss.slashdot.org/Slashdot/slashdot

Work Related


drupal.org - Community plumbing
http://drupal.org/node/feed

Google Analytics Blog
http://analytics.blogspot.com/feeds/posts/default

Inside AdSense
http://adsense.blogspot.com/atom.xml

Official Google Australia Blog
http://google-au.blogspot.com/atom.xml

Official Google Webmaster Central Blog
http://googlewebmastercentral.blogspot.com/atom.xml

Official Yahoo! Store Blog tips and tricks for ecommerce success
http://www.ystoreblog.com/blog/wp-rss2.php

The Sydney Morning Herald Technology Headlines
http://feeds.smh.com.au/rssheadlines/technology.xml

Yahoo! Search Blog
http://feeds.feedburner.com/YahooSearchBlog

Zlio Blog
http://feeds.feedburner.com/ZlioBlogUS

Off Beat RSS Feeds


ABC News: Offbeat
http://www.abc.net.au/news/syndicate/offbeatrss.xml

AP Top Strange News
http://hosted.ap.org/lineups/STRANGEHEADS-rss_2.0.xml

CNN.com - Offbeat
http://rss.cnn.com/rss/cnn_offbeat.rss

National Geographic News
http://news.nationalgeographic.com/index.rss

NEWS.com.au | The Other Side
http://feeds.news.com.au/public/rss/2.0/news_the_other_side_46.xml

Offbeat News
http://www.topix.net/rss/news/weird

Reuters: Oddly Enough
http://feeds.reuters.com/reuters/oddlyEnoughNews/

USATODAY.com Offbeat - Top Stories
http://rssfeeds.usatoday.com/UsatodaycomOffbeat-TopStories

Yahoo! News: Odd News
http://rss.news.yahoo.com/rss/oddlyenough

Comic RSS Feeds


Achewood
http://www.achewood.com/rss.php

Dilbert
http://feeds.feedburner.com/tapestrydilbert

The Perry Bible Fellowship
http://www.pbfcomics.com/feed/feed.xml

White Ninja Comics
http://www.whiteninjacomics.com/rss/z-latest.xml

xkcd.com
http://xkcd.com/rss.xml

Tuesday, September 04, 2007

GPRS Data Usage differences between Nokia and Sony

From my examples I can clearly see that a Nokia phone sends more information in the header, compared to the Sony Ericsson. But when checking the data counters on the phone, viewing 25 exact same pages I have designed, the phones reported the following :

Nokia 7250i:
Sent Data : 6,500 B
Received Data : 55,000 B

Sony Ericsson K750i:
Sent Data : 22,000 B
Received Data : 65,000 B

Now this is a bit alarming, as I am trying to calculate GPRS cost of usage, yet 2 phones are telling me different things.

My Calculations:
The Sony seems about right at 25 pages * (approx 777 B header) = 19,425B
Yet the Nokia should be showing 25 pages * (approx 1,641 B header) = 41,025 B

So anybody know anything about GPRS costs? Time to ask the Telco we use at work....

As for the code I am writing, it checks to see if the phone is capable of viewing XHTML from its header. If that's possible I display a nice colourful XHTML page. If that isn't found, they are displayed a basic wml (wap) page. So I don't care if its Nokia, Sony... as long as the phone reports that it can view something, I display it...

Monday, September 03, 2007

Layout problems with XHTML MP and WML

Things that have so far been a pain in the butt to fix:

1) A link like this blew up the DTD i was using :
<a href="wap_page.php?value1=blah&value2=blah">Link</a>

Q)Why did it blow up?
A)The "&" was the problem using This site I have to change "&" to "& #38;"

2) Field input, using this example I still cannot get the text and input fields to display like they have it (everything in line)

I cannot put the input fields into a table, as that blows up the DTD. And using extra spaces " " just doesn't do the trick, as 3 blank spaces might be displayed differently on different phone.

Example I want:


Login : [_____]
Password: [_____]

This is what i get:
Login : [_____]
Password: [_____]

This could easily be fixed if in wml I could use "<pre>" tags, but I guess that will have to do.

3) This has got me stumped, i have cut out most of the code, but just show how fun this is here is the simple version :

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">
<wml>
<card id='input1' title='Wap Page'>
<p>
<anchor>
<go href='wap_page.php' method='post'>
<postfield name='report' value='yes'/>
<postfield name='type' value='stuff'/>
</go>
Display Details
</anchor>
</p>
</card>
</wml>

Now what is the problem? Well the anchor link works on Telstra using my Nokia 7250i, but when I change sim card to Vodafone on the exact same phone, the anchor link doesn't work. It just points to the top of the page. I really couldn't be bothered chasing this one up. So I used a different type of link...

Sunday, September 02, 2007

Mobile Phone Headers

Well I don't know if I am going to get much response to this, but I am going to add stuff I know, just in case anybody does a search later and hopefully this info will save them some grief...

The system I have wrote is in PHP, and output is determined on :


if(strpos($_SERVER['HTTP_ACCEPT'],"application/vnd.wap.xhtml+xml")){
// display xhtml code
}else{
// display wml code
}


Headers I send
// send wml headers
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
//echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""
// . " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\">\n";


// send XHTML headers
header("Content-type: application/vnd.wap.xhtml+xml");
echo "<?xml version=\"1.0\"?>\n";
echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\"\n";
echo "\"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n";



Nokia 7250i
HTTP_USER_AGENT = Nokia7250I/1.0 (3.22) Profile/MIDP-1.0 Configuration/CLDC-1.0

HTTP_ACCEPT = text/css, text/html, application/vnd.wap.xhtml+xml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, application/vnd.wap.wbxml, application/xhtml+xml, application/wml+xml, application/vnd.wap.xhtml+xml, application/x-wap-prov.browser-settings, application/x-nokia.settings, text/x-vcard, text/x-vcalendar, application/vnd.wap.wtls-ca-certificate, application/vnd.wap.hashed-certificate, application/vnd.wap.signed-certificate, application/vnd.wap.cert-response, application/vnd.wap.sic, application/vnd.wap.slc, application/x-wap-prov.browser-bookmarks, text/x-co-desc, application/vnd.oma.drm.message, image/gif, image/jpeg, image/jpg, image/bmp, image/png, image/vnd.wap.wbmp, image/vnd.nok-wallpaper, image/vnd-nok-camera-snap, image/vnd-nok-camera-snsp, application/vnd.wap.mms-message, text/vnd.sun.j2me.app-descriptor, application/vnd.nokia.ringing-tone, audio/midi, audio/mid, audio/x-midi, audio/x-mid, audio/sp-midi, application/java, image/vnd.nok-oplogo-color, application/java-archive, application/x-java-archive, text/vnd.wap.wml, text/vnd.wap.wmlscript, */*;q=0.001
(Added spaces to not break tables)


Sony Ericsson K750i
HTTP_USER_AGENT = SonyEricssonK750i/R1L Browser/SEMC-Browser/4.2 Profile/MIDP-2.0 Configuration/CLDC-1.1

HTTP_ACCEPT = image/gif, application/vnd.wap.multipart.mixed, multipart/mixed, application/xhtml+xml, application/vnd.wap.wml, application/vnd.wap.xhtml+xml, text/vnd.wap.wml, text/vnd.wap.wmlscript, */*;q=0.001
(Added spaces to not break tables)

Blackberry
HTTP_USER_AGENT = BlackBerry7290/4.0.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/5.1.2.5

HTTP_ACCEPT = application/vnd.rim.html, text/html, text/plain, application/xhtml+xml, application/vnd.wap.xhtml+xml, application/vnd.wap.wml+xml, application/vnd.wap.wmlc, application/vnd.wap.wmlscriptc, image/gif;anim=1, image/jpg, image/vnd.wap.wbmp, image/png, image/vnd.rim.png, image/jpeg, image/pjpeg, application/smil, application/x-vnd.rim.pme, application/x-vnd.rim.pme.b, image/pme, application/vnd.oma.drm.message, audio/midi, audio/x-midi, audio/mid, application/x-javascript, application/vnd.rim.jscriptc;v=0-8-8, text/css;media=handheld, application/vnd.wap.multipart.mixed, application/vnd.wap.multipart.alternative, application/vnd.wap.multipart.related, multipart/mixed, multipart/alternative, multipart/related, text/vnd.sun.j2me.app-descriptor, application/java-archive, application/vnd.rim.proxyconfig, application/vnd.wap.coc, application/vnd.wap.slc, application/vnd.wap.sic, text/vnd.wap.co, text/vnd.wap.sl, text/vnd.wap.si, application/x-x509-ca-cert, application/x-x509-email-cert, application/x-x509-server-cert, application/x-x509-user-cert, application/vnd.wap.signed-certificate, application/vnd.wap.cert-response, application/vnd.wap.wtls-ca-certificate, image/bmp, image/vnd.wap.wbmp, text/x-wap.wml, text/vnd.wap.wml, text/x-hdml, text/html, text/vnd.wap.wmlscript, text/vnd.wap.co, text/vnd.wap.si, text/vnd.wap.sl, */*

Saturday, September 01, 2007

Mobile Phone development with XHTML MP and WML

I have been required to design some pages that can be displayed on mobile phones. I have everything working in PHP where older phones get an generic .wml page, and newer phones get a nice colourful .xhtml page.

Now anybody got some decent example of WAP pages. What I am after is some kind of display standard. I notice some places use a bunch on "<" "<<" "^" ">>" ">" type links for navigation.

Also after some examples of colourful xhtml displays where the output is all text, and no use of images.

My code is great, unfortunately my front-end skills at the moment need some motivation. So any useful links anybody has in regards to mobile web pages development would be great.

So far I have been getting info from:
http://www.thozie.de/english/mobileweb/markup/tables.htm
http://www.w3schools.com/wap/default.asp
http://www.zend.com/zend/tut/wap.php
http://www.developershome.com/wap/wml/wmlSendingData.asp
http://www.notepad.co.uk/articles/refsheet_wml_tags_atoz.php
http://www.w3.org/MarkUp/html-spec/html-spec_13.html
http://www.experts-exchange.com/Programming/Wireless_Programming/WAP/
http://webcab.de/wbhhe.xhtml
http://www.forum.nokia.com/main/1,6566,1_1_25_30,00.html