I would like to set a User Agent for an iFrame as iPhone. I found this code:
navigator.__defineGetter__('userAgent', function(){
return 'foo' // customized user agent
});
navigator.userAgent; // 'foo'
I am wondering how to insert this with my code: PHP/HTML:
<div class="holder">
<form action="page.php" method="post">
<label>
http://
</label>
<input type="text" name="url" value="<? echo $_POST['url']; ?>" />
<input type="submit" value="Anschauen" />
</form>
</div>
<div class="iphone">
<iframe src="<? echo 'http://'. $_POST['url']; ?>"></iframe>
</div>
If the above script doesn't work is there any possibility to use AJAX or cURL, if yes could anyone give an example for my code, since I don't know how to code AJAX or cURL.