通过javascript重定向该页面后,如何获取整个页面内容?
在executewebpage.php 中:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setOpt($ch, CURLOPT_POST, TRUE);
$url = 'http://www.doredirect.com';
$postfields = array('doredirect'=>'true','trigger'=>'1');
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
echo($data); //In this step, it redirect to page: http://www.finalpage.com
curl_close($ch);
如何获取http://www.finalpage.com的内容?
注意:如果我不回显,它不会返回任何内容,也不会重定向到任何页面
非常感谢!