|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-25 02:23 UTC] SiberianGhost at hotmail dot com
This function return empty result. In PHP 4.2.1 all work correctly.
function _HttpsReq($addr)
{
$ch = curl_init("https://192.0.0.1".$addr);
curl_setopt($ch, CURLOPT_HEADER, 0);
$fp = tmpfile();
// fwrite($fp," ");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fseek($fp,0,SEEK_SET);
$result = fgets($fp,1024);
fclose($fp);
return $result;
} //return empty result
When i uncomment string fwrite($fp," "); All work correctly.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 15:00:01 2025 UTC |
Verified with this script: <?php $ch = curl_init("https://solo3.merita.fi/cgi-bin/SOLO0001"); curl_setopt($ch, CURLOPT_HEADER, 0); $fp = tmpfile(); curl_setopt ($ch, CURLOPT_FILE, $fp); curl_exec($ch); curl_close($ch); // fseek($fp,1,SEEK_SET); // uncomment this and it works.. fseek($fp,0,SEEK_SET); $result = fgets($fp,1024); fclose($fp); var_dump($result); ?> Outputs: bool(false)