diff --git a/http2pic.class.php b/http2pic.class.php index 3954e9c..231a62b 100644 --- a/http2pic.class.php +++ b/http2pic.class.php @@ -146,7 +146,7 @@ class http2pic function renderPagePHANTOMJS() { $cmd = 'timeout '.$this->params['timeout'].' '.PHANTOMJSPATH; - $cmd.= ' '.__DIR__.'/phantom.js '; + $cmd.= ' --ignore-ssl-errors=yes --ssl-protocol=any '.__DIR__.'/phantom.js '; $cmd.= ($this->params['url']); $cmd.= ','.($this->params['file']); @@ -279,7 +279,7 @@ class http2pic function isURLReachable($url) { $ch = curl_init($url); - curl_setopt($ch, CURLOPT_NOBODY, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); $code = curl_getinfo($ch, CURLINFO_HTTP_CODE); diff --git a/phantom.js b/phantom.js index 7124e70..822c7b4 100644 --- a/phantom.js +++ b/phantom.js @@ -13,7 +13,6 @@ var js = input[4]; var pageWidth = (vp_w!="")?parseInt(vp_w, 10):1024; var pageHeight = (vp_h!="")?parseInt(vp_h, 10):'auto'; page.viewportSize = { width: pageWidth, height: pageHeight }; -page.clipRect = { top: 0, left: 0, width: pageWidth, height: pageHeight }; page.settings['javascriptEnabled'] = (js=="no")?false:true; page.open(address, function (status) { @@ -26,4 +25,4 @@ page.settings['javascriptEnabled'] = (js=="no")?false:true; phantom.exit(); }, 200); } - }); \ No newline at end of file + });