url içerik, tamponsuz php okumak

0 Cevap php

Tüm,

Bu fonksiyon bir url okur

 function get_url_contents($url){
    $crl = curl_init();
    $timeout = 5;
    curl_setopt ($crl, CURLOPT_URL,$url);
    curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);
    $ret = curl_exec($crl);
    curl_close($crl);
    return $ret;
}

but I want to read it unbuffered, so I can read an unbufferd cgi-script, eg, to analyze it while it is loading? how do I do this in php?

0 Cevap