Note that there are some explanatory texts on larger screens.

plurals
  1. POfile_get_contents not getting the file contents?
    primarykey
    data
    text
    <p>I've used a simple file_get_contents function but that didn't get the actual contents (output) of that..</p> <p>I could not figure the error!!!</p> <p>Code:</p> <pre><code>&lt;?php // $url = $_GET['url']; // $flv_http_path = urlencode($url); $flv_http_path = 'http://r12.bhartibb-maa1.c.youtube.com/videoplayback?ip=0.0.0.0&amp;sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dXSlBSUl9FSkNNN19ITFZB&amp;algorithm=throttle-factor&amp;itag=34&amp;ipbits=0&amp;burst=40&amp;sver=3&amp;expire=1285074000&amp;key=yt1&amp;signature=3E1E4994130745C392FA479F6ACCE5F40E703A2C.A87325A1DCB178B04FD89A9DEEE811CDCB08157C&amp;factor=1.25&amp;id=8b2fd4fd9ac2f09f&amp;st=lc'; echo "----$flv_http_path------"; $data = file_get_contents($flv_http_path); echo "$data"; if($data) echo "data is avail"; else echo "data not available"; // $new_flv_path = dirname(_FILE_).'/flvs/sample.flv' ; $new_flv_path = '/home/public_html/temp/sample.flv' ; if(file_put_contents($new_flv_path, $data)) return $new_flv_path ; else { echo "else part "; return false; } ?&gt; </code></pre> <p>I got that url from the response headers of the youtube video</p> <p>and the headers which i got is</p> <pre><code>http://v3.lscache1.c.youtube.com/videoplayback?ip=0.0.0.0&amp;sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dXSlBTVl9FSkNNN19ITVpF&amp;algorithm=throttle-factor&amp;itag=34&amp;ipbits=0&amp;burst=40&amp;sver=3&amp;expire=1285088400&amp;key=yt1&amp;signature=536A81F10AA43A4E015BB05FA182A9A966047C3C.C22269E2E1ECFC2C2DE7A8A45BA2C3DF7CF1EC08&amp;factor=1.25&amp;id=fd61d32bbbd1be5e&amp; GET /videoplayback?ip=0.0.0.0&amp;sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Calgorithm%2Cburst%2Cfactor%2Coc%3AU0dXSlBTVl9FSkNNN19ITVpF&amp;algorithm=throttle-factor&amp;itag=34&amp;ipbits=0&amp;burst=40&amp;sver=3&amp;expire=1285088400&amp;key=yt1&amp;signature=536A81F10AA43A4E015BB05FA182A9A966047C3C.C22269E2E1ECFC2C2DE7A8A45BA2C3DF7CF1EC08&amp;factor=1.25&amp;id=fd61d32bbbd1be5e&amp; HTTP/1.1 Host: v3.lscache1.c.youtube.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: VISITOR_INFO1_LIVE=9CH-GUrsSEQ; __utma=27069237.1455305642.1275034254.1279868001.1280568792.6; __utmz=27069237.1279868001.5.2.utmcsr=google.com|utmccn=(referral)|utmcmd=referral|utmcct=/landing/youtube/lifeinaday/; watched_video_id_list_kvijayhari=7b1d7ce3852b9aca07a985813b83aaa6WxMAAABzCwAAADFuNzRnSExwU0M4cwsAAAB2ajgxNXlQNDFMQXMLAAAARWNjZ0lLdHVDM1lzCwAAAHFHZFo5elhoQ0ZvcwsAAAB0WXMwTXhvbTRjSXMLAAAAYUdBdDZwNGh0c2NzCwAAAGR2V25wMjdBSGZvcwsAAABtNDBhbG1SQzNzSXMLAAAANjhVT1BhTUtwOTBzCwAAADZnaFUxWDBqdVM4cwsAAABiRy0xYTRsUnlEMHMLAAAAWjh5OFFDRFNUQ29zCwAAADY0T0w3NzhBeUlFcwsAAABzQkl1OWpnSWtwQXMLAAAASllYM08wWEEteWdzCwAAAF95WGxpc0g4dkF3cwsAAABzcXZCSXdDMWxtWXMLAAAAaEMzd09EU0U5MHdzCwAAAGZaODhxaHduTVow; auto_translation=b901c47ed36700682e23d64062529856cwQAAAB0cnVl; PREF=f1=50000000&amp;f2=2000&amp;emt=iceberg&amp;ftuc=32&amp;ems=hd720&amp;HIDDEN_MASTHEAD_ID=brO_JIa6RTI; use_hitbox=72c46ff6cbcdb7c5585c36411b6b334edAEAAAAw; GEO=489e10e70a42c0dfed7513e1895ffe1bcwsAAAAzSU56spxTTJhEAw==; watched_video_id_list=2aa4a241cbdc35137f13b3513ea3e653WwQAAABzCwAAAF9XSFRLN3ZSdmw0cwsAAABpeV9VX1pyQzhKOHMLAAAAd3ZsTUFKLVU2SEVzCwAAAENaQmpoVGQ0WjlN HTTP/1.0 200 OK Last-Modified: Sun, 20 Jun 2010 03:59:10 GMT Content-Type: video/x-flv Date: Tue, 21 Sep 2010 10:05:34 GMT Expires: Tue, 21 Sep 2010 16:55:00 GMT Cache-Control: public, max-age=24566 Content-Length: 4077907 Accept-Ranges: bytes X-Content-Type-Options: nosniff Server: gvs 1.0 X-Cache: MISS from localhost.localdomain X-Cache-Lookup: MISS from localhost.localdomain:3128 Via: 1.0 localhost.localdomain:3128 (squid/2.6.STABLE6) Connection: keep-alive </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload