diff options
Diffstat (limited to 'ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt')
-rw-r--r-- | ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt b/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt index 9de2c0faba..92c80d1732 100644 --- a/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt +++ b/ext/curl/tests/curl_setopt_CURLOPT_READFUNCTION.phpt @@ -4,16 +4,16 @@ cURL option CURLOPT_READFUNCTION WHITE new media architects - Jeroen Vermeulen #testfest Utrecht 2009 --SKIPIF-- -<?php -if (!extension_loaded("curl")) print "skip cURL extension not loaded"; +<?php +if (!extension_loaded("curl")) print "skip cURL extension not loaded"; ?> --FILE-- -<?php -function custom_readfunction($oCurl, $hReadHandle, $iMaxOut) +<?php +function custom_readfunction($oCurl, $hReadHandle, $iMaxOut) { $sData = fread($hReadHandle,$iMaxOut-10); # -10 to have space to add "custom:" if (!empty($sData)) - { + { $sData = "custom:".$sData; } return $sData; @@ -35,9 +35,9 @@ curl_setopt($oCurl, CURLOPT_INFILE, $hReadHandle ); curl_exec($oCurl); curl_close($oCurl); -fclose ($hReadHandle); +fclose ($hReadHandle); -$sOutput = file_get_contents($sWriteFile); +$sOutput = file_get_contents($sWriteFile); var_dump($sOutput); ?> ===DONE=== |