Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 5th Jan 2015, 02:13 AM   #1
Email Monetization Expert
 
DIABL0's Avatar
 
Join Date: 2011
Posts: 2,993
Thanks: 38
Thanked 1,374 Times in 927 Posts
Default
Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

Anyone know the trick to spoofing user agent, so that a site will think it's a mobile device and return a mobile version if one exists, instead of desktop version?
DIABL0 is offline  
Unread 5th Jan 2015, 10:07 AM   #2
Advanced Warrior
 
Join Date: 2013
Location: teri maa ki chut
Posts: 540
Thanks: 26
Thanked 77 Times in 72 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

All you need is User Agent Switcher Addon available for Chrome and Firefox.
Just google it.

lrs1995 is offline  
Unread 6th Jan 2015, 12:03 AM   #3
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,270
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

@diablo - an old video but you may find it useful

User Agent Switcher | JumpMobi Insider

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 6th Jan 2015, 12:21 AM   #4
Email Monetization Expert
 
DIABL0's Avatar
 
Join Date: 2011
Posts: 2,993
Thanks: 38
Thanked 1,374 Times in 927 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

Thanks, but that's not what I'm looking for.

This is a web server based simulator. Exist on a url and users with different web browsers can access it. I know the ability to spoof the user agent is possible, so that it will return a mobile version of a site if one exists, because I have seen it done.
DIABL0 is offline  
Unread 6th Jan 2015, 01:10 PM   #5
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,270
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

I see what you are saying now - i created a mobile checker for our JumpMobi Insiders that does what you are asking...

See screenshot here: http://screencast.com/t/IdV0rBEJ

As you can see the last screenshot the display on the far right is what is displayed when you view the site with an active mobile user agent.

This is done with PHP CURL and the CURLOPT_USERAGENT variable.

If its just a screen capture you need instead of a functional page grab then i would recommend using a Screenshot API Service - it's quicker and MUCH easier to implement!

For example url2png.com is a service i have used before..

Hope that helps...

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 6th Jan 2015, 06:28 PM   #6
Email Monetization Expert
 
DIABL0's Avatar
 
Join Date: 2011
Posts: 2,993
Thanks: 38
Thanked 1,374 Times in 927 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

I see what you are saying now - i created a mobile checker for our JumpMobi Insiders that does what you are asking...

See screenshot here: 2015-01-06_1258 - jumpmobijing's library

As you can see the last screenshot the display on the far right is what is displayed when you view the site with an active mobile user agent.

This is done with PHP CURL and the CURLOPT_USERAGENT variable.

If its just a screen capture you need instead of a functional page grab then i would recommend using a Screenshot API Service - it's quicker and MUCH easier to implement!

For example url2png.com is a service i have used before..

Hope that helps...
I'm actually loading the page in an iframe.

Know of any links you could point me to of examples?
DIABL0 is offline  
Unread 6th Jan 2015, 06:39 PM   #7
Email Monetization Expert
 
DIABL0's Avatar
 
Join Date: 2011
Posts: 2,993
Thanks: 38
Thanked 1,374 Times in 927 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

Originally Posted by Jay Moreno View Post

I see what you are saying now - i created a mobile checker for our JumpMobi Insiders that does what you are asking...

See screenshot here: 2015-01-06_1258 - jumpmobijing's library

As you can see the last screenshot the display on the far right is what is displayed when you view the site with an active mobile user agent.

This is done with PHP CURL and the CURLOPT_USERAGENT variable.

If its just a screen capture you need instead of a functional page grab then i would recommend using a Screenshot API Service - it's quicker and MUCH easier to implement!

For example url2png.com is a service i have used before..

Hope that helps...
I'm actually loading the page in an iframe.

CURLOPT_USERAGENT => "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A537a Safari/419.3", // who am i

So the above doesn't work, but I take it that it should. I think I have a problem with my code somewhere. I'm going to get my buddy to have a look, he is real good with this stuff.
DIABL0 is offline  
Unread 7th Jan 2015, 11:50 AM   #8
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,270
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

yeah serving the iframe with the user agent variable wont work

create a page that grabs the user agent spoofed content first

on a different page the iframe should display the page with the spoofed content

you also need to delay the loading of the iframe so as to enable time to allow the content to be grabbed... if its dynamic you need to create a form that passes the variables from the form to the page that grabs the content...

as you can see its not actually as straight forward as you would think it is - other things to note in some instances the url structure changes too so with curl you have to follow any re-routing urls too...

some sites also use sessions/cookies to display mobile content

i found out all the above through trial and error... but even when i had it working for the most part some sites still didnt render properly so its why i decided to go with the screencapture instead...

hth

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Unread 18th Feb 2015, 11:43 AM   #9
Mobile+WP = JumpMobi.com
War Room Member
 
Jay Moreno's Avatar
 
Join Date: 2009
Location: San Antonio, Tx
Posts: 1,270
Thanks: 301
Thanked 449 Times in 309 Posts
Default
Re: Web Based Mobile Simulator (user agent spoof)
Share on: 
fb share twitter share gplus share more share

Unfortunately that resource is only really useful if your site is responsive or you have a standalone mobile site, if your sites uses RESS or an Adaptive approach for mobile visitors it doesn't give a true representation of what the mobile visitor sees.

With a RESS/Adaptive approach the same url is used but a different HTML layout is rendered not based on screen size but by the browsers user agent type....

Hope that makes sense

Cheers,

Jay

Sorry, I am too busy helping people to think of a cool signature!
Jay Moreno is offline  
Closed Thread


Bookmarks

Tags
agent, based, mobile, simulator, spoof, user, web


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 12:59 AM.