Good morning !! I was doing some things here and decided to put an iFrame on the page, but it was loaded with the User Agent from some other browser. Just to understand the behavior of the site.
Is this possible with HTML5 and Javascript?
Otherwise, can you do this with cURL in PHP? And how do I do it?
I was able to do this with cURL, but I wanted to do it with iFrame. The solution in PHP was:
<?php
$url = "http://example.com";
$ch = curl_init();
$curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Linux; U; Android 4.0.3; de-ch; HTC Sensation Build/IML74K) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30");
curl_exec($ch);
Playing all this in a DIV, I get something, but I want to do with iFrame, because then I have problem with images, which I solved with a base tag, but I prefer iFrame.