pokek Posted July 1, 2022 Share Posted July 1, 2022 I just recently register new webhost account of hyperphp. Then i try a simple curl to get request from php file in server. <?php header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS'); header('Access-Control-Max-Age: 1000'); header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With'); $arr['id'] = '001'; $arr['desc'] = 'Simple JSON output'; $json = json_encode($arr); echo $json; ?> and the curl <?php $options = array( CURLOPT_RETURNTRANSFER => true, // return web page CURLOPT_HEADER => false, // don't return headers CURLOPT_FOLLOWLOCATION => true, // follow redirects CURLOPT_MAXREDIRS => 10, // stop after 10 redirects CURLOPT_ENCODING => "", // handle compressed CURLOPT_USERAGENT => "test", // name of client CURLOPT_AUTOREFERER => true, // set referrer on redirect CURLOPT_CONNECTTIMEOUT => 120, // time-out on connect CURLOPT_TIMEOUT => 120, // time-out on response CURLOPT_SSL_VERIFYPEER => false, // SSL verify CURLOPT_FAILONERROR => true, // show errors ); $response = array(); $url = 'https://account.hyperphp.com/testjson.php'; $ch = curl_init($url); curl_setopt_array($ch, $options); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); $response['content'] = curl_exec($ch); $response['error'] = curl_error($ch); if ($showinfo) $response['info'] = curl_getinfo($ch); curl_close($ch); echo var_dump($response); ?> then i always get this result Array ( [content] => <html><body><script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("f06f823e8e20ec9912d20bf9fdfcd15f");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="https://kostid.hyperphp.com/clientip.php?ip=4444&i=1";</script><noscript>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support</noscript></body></html> [error] => ) Is there a problem with curl in webhosting? Quote Link to comment Share on other sites More sharing options...
Burke Knight Posted July 1, 2022 Share Posted July 1, 2022 Please sign up and file a support ticket at https://support.ifastnet.com/ They'll be able to help you out better. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.