cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Capture streaming audio rm Real Player

From: imran khalid <imranlink_at_hotmail.com>
Date: Thu, 04 Nov 2004 04:57:34 +0000

Hi,

Any help or feedback to this problem will be highly appricated.
I am trying to download music from a web site but fail to do so.
I am using CURL + PHP to Capture streaming audio rm Real Player from a site
but the site refused the access to this file by CURL + PHP.

http://www.muziq.net/play.php?songid=4521
http://www.muziq.net/newjukebox/juke.php?TrackID=4521
http://216.40.249.19/temp/wjkwkb.rm.smil
http://www.pakmusicvideos.com/tempor/wjkwkb.rm

The Web site First create a temp file and then start streaming from this
file inside web browser embeded Real Player.

I am using the code

        $LOGINURL = 'http://www.pakmusicvideos.com/tempor/ycjm.rm';

        $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL,$LOGINURL);
        curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT
5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)");
        curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
        curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie\cookie_file");
        curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie\cookie_file");
        curl_setopt($ch, CURLOPT_REFERER,
"http://www.muziq.net/play.php?songid=4521");
        $fileContent = curl_exec ($ch);
        curl_close ($ch);

        $file = fopen('song.ram', "wb");
        fputs($file,$fileContent);
        fclose($file);

Regards,

Muhammad Imran Khalid
(PHP Developer)
imranlink_at_hotmail.com
+92.0437.602955
imrankhalid.5u.com

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.com/
Received on 2004-11-04