• 05-06-2009, 20:57:46
    #1
    Array
    (
        [wrapper_data] => Array
            (
                [6] => Content-Length: 0
                [7] => Connection: close
                [12] => Content-Type: video/x-flv
                [13] => Content-Length: 11382407
                [14] => Expires: Fri, 05 Jun 2009 18:23:45 GMT
                [15] => Cache-Control: public,max-age=3600
                [16] => Connection: close
                [17] => Date: Fri, 05 Jun 2009 17:23:45 GMT
    
            )
        [wrapper_type] => http
    )
    Content-Length: 11382407

    burdaki 11382407 değerini nasıl alabiliriz yukarıdaki dizi içinden? dizi içerisinde 2 adet Content-Length mevcuttur 2.ciyi alacağız yada 0 olmayanı..

    $headers["wrapper_data"][13]

    şeklinde alabılıyorum ama 13 değerine gelmiyor her zaman verideki 2. "Content-Length:"
  • 05-06-2009, 23:17:22
    #2
    $no = 0;
    foreach ($header['wrapper_data'] as $id=>$deger)
    {
    	if (preg_match('/Content-Length: (\d*)/', $deger, $sonuc))
    	{
    		if ($sonuc[1] != 0)
    		{
    			$no = $sonuc[1];
    		}
    	}
    }
    şeklinde...
    İyi çalışmalar.