curl-and-php
getting a file
From: Daniel Kantor <dkantor_at_nyu.edu>
Date: Thu, 23 Jun 2005 21:59:40 -0700
Date: Thu, 23 Jun 2005 21:59:40 -0700
I am trying to have curl retrieve a text file from a remote server,
parse the text within that file, and then output it to the web browser.
I cannot figure out how to parse the text though. Here is my code:
<?php
$ch = curl_init
(“http://www.archive.org/download/jj2004-08-27/jj2004-08-27_vbr.m3u%94);
curl_setopt ($ch, CURLOPT_FAILONERROR, true);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 1);
$curl_exec = curl_exec($ch);
curl_close ($ch);
?>
Where exactly is the text to act upon? I tried some functions on $ch as
well as $curl_exec and nothing worked.
Thanks.
Received on 2005-06-24