|
|
@@ -88,7 +88,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-$isRspCookie = false;
|
|
|
+$isRspMoreInfo = false;
|
|
|
if (isset($postData['url'])) {
|
|
|
$webUrl = urldecode($postData['url']);
|
|
|
if (!preg_match('/^(http:\/\/|https:\/\/)/', $webUrl)) {
|
|
|
@@ -122,8 +122,8 @@ if (isset($postData['useProxy'])) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-if (isset($postData['rspCookie'])) {
|
|
|
- $isRspCookie = $postData['rspCookie'] == 1 ? true : false;
|
|
|
+if (isset($postData['rspMore'])) {
|
|
|
+ $isRspMoreInfo = $postData['rspMore'] == 1 ? true : false;
|
|
|
}
|
|
|
|
|
|
// selenium-server-standalone-#.jar (version 4.x)
|
|
|
@@ -198,9 +198,16 @@ if($customHeaders && isset($customHeaders['Cookie'])){
|
|
|
|
|
|
$content = $driver->getPageSource();
|
|
|
|
|
|
-if($isRspCookie){
|
|
|
+if($isRspMoreInfo){
|
|
|
$cookies = $driver->manage()->getCookies();
|
|
|
- echo json_encode(array('cookie' => $cookies, 'content' => $content));
|
|
|
+ $rspData = array(
|
|
|
+ 'cookie' => $cookies,
|
|
|
+ 'content' => $content
|
|
|
+ );
|
|
|
+ if($proxy && isset($proxy['httpProxy'])) {
|
|
|
+ $rspData['proxy'] = $proxy['httpProxy'];
|
|
|
+ }
|
|
|
+ echo json_encode($rspData);
|
|
|
} else {
|
|
|
echo $content;
|
|
|
}
|