I\'m writing a web based iPhone simulator and I\'m looking for a way to spoof iPhone\'s Safari browser so that web pages loaded within the simulator (iframe) to use the mobi
If you would like to spoof headers for your end users, then using a User Agent altering browser add-on is not an option. My suggestion is to write a simple PHP script to which you pass the URL to be fetched, and make a PHP cURL request towards that URL, but beforehand you should set the User Agent header with the following call:
curl_setopt($ch,CURLOPT_HTTPHEADER,array('User-Agent: Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A537a Safari/419.3'));
I think this should work, but it will kill your server in no time...