blog advertising is good for you


blog advertising is good for you
User login

Pretending to be an iPhone

This is entirely pointless if you have an iPhone. However, if you’re locked into a Sprint contract until next October, sometimes it’s nice to see how the other side lives.

The iPhone redirects RSS requests through reader.mac.com with a special URL: http://reader.mac.com/mobile/v1/http%3A//domain.com/feed.xml. However, going to that directly on a Mac gives you the “You’re not an iPhone” message.

Curious as to what I was missing, I grepped MG’s logs for iPhone browser user agent strings (we’re well-read in the Bay Area, it appears) and found some. So I made a modified attempt:

curl -A “Mozilla/5.0 (iPhone; U; OS X Leopard 9A365; en) KHTML” http://reader.mac.com/mobile/v1/http%3A//www.hopelessgeek.com/rss.xml > foo.html

This worked well, but the links were off as they were not fully-qualified. Insert a BASE command in the header and reload and … voila, I could see what the reader looked like.

However, this is a little kludgy. There’s a better way. Open up Firefox and go to about:config and search for “agent”. For the general.useragent.extra.firefox value, double-click and then enter, simply, “iPhone”. Now browse to the URL of the iPhone application directly and it will load in FF without issue. For now. Smiling

Tip to Apple: Safari’s debug menu needs an iPhone option under User Agent.

Average rating
(0 votes)
About Adam Knight
Adam Knight's picture

Author Biography

Adam Knight is one of the founders of Mac Geekery and is a geek at heart. Programmer by day, hacker by night, his daily life revolves around the Macintosh platform, which he has been a user and programmer for since the early days of System 7 when his LCII replaced his Apple //c.

In-between tech jobs, he’s managed to learn the basics of any web hacker: PHP, MySQL, Perl, Apache, Linux, *BSD, and the intricacies of ./configure —prefix=~/bombshelter/. Today, codepoet is concentrating on blogging again, writing some software for the Mac by himself (including Notae) and for his company (such as Switchblade) and has a few other toys coming out soon.

Bug him over AIM or email [link fixed].

Firefox user agent string can be easily modified using the “user agent switcher” extension.

I wish i could attach this, its the user agent export, so far it works but the feed url he gave didnt respond. i am posting it in the next comment.

<useragentswitcher><useragent description="Internet Explorer 7 (Windows Vista)" useragent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" appname="Microsoft Internet Explorer" appversion="4.0 (compatible; MSIE 7.0; Windows NT 6.0)" platform="Win32" vendor="" vendorsub=""/><useragent description="Netscape 4.8 (Windows Vista)" useragent="Mozilla/4.8 [en] (Windows NT 6.0; U)" appname="Netscape" appversion="4.8 [en] (Windows NT 5.1; U)" platform="Win32" vendor="" vendorsub=""/><useragent description="Opera 9.2 (Windows Vista)" useragent="Opera/9.20 (Windows NT 6.0; U; en)" appname="Opera" appversion="9.20 (Windows NT 5.1; U; en)" platform="Win32" vendor="" vendorsub=""/><useragent description="iphone" useragent="Mozilla/5.0 (iPhone; U; OS X Leopard 9A365; en) KHTML" appname="iPhone" appversion="" platform="OS X Leopard" vendor="" vendorsub=""/></useragentswitcher>

ok, i can’t post xml on your site, lest i entity all the markup, which will be interesting. Enter vi!

Adam Knight's picture

I updated the comment so it would post its contents raw. What browser does it work on?

sweet!, thanks it works in firefox. copy and paste this into a text document and save as xml. then have the firefox useragent switcher import the file. of corse, i claim no leetness on my part. i just put the relevent info into firefox and exported the agent. and here is how to do it in safari. (not through user agent switch, when u read the page you’ll get it). www.rubyrobot.org/article/spoofing-the-user-agent-for-awstats-with-safar…

Post new comment
The content of this field is kept private and will not be shown publicly.
1 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.