您可以使用PHP作为 iframe 的替代方案来获取带有cURL的页面。
$header = NULL;
$cookie = NULL;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, $header);
curl_setopt($ch, CURLOPT_NOBODY, $header);
curl_setopt($ch, CURLOPT_URL, "http://www.facebook.com");
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__). '/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__) . '/cookies.txt'); //save cookies here
curl_setopt($ch, CURLOPT_REFERER, "http://www.facebook.com"); // you don't need that line; it's just the referer
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);;
$output = curl_exec($ch);
curl_close($ch);
echo $output;
此外,使用 cURL,您将能够在页面输出处进行修改。