Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Download Streaming Media?

by isotope (Deacon)
on Apr 18, 2003 at 21:52 UTC ( [id://251558]=note: print w/replies, xml ) Need Help??


in reply to Download Streaming Media?

ls -la /usr/lib/perl5/site_perl/5.6.1/LWP/Protocol total 96 drwxr-xr-x 2 root root 4096 Mar 10 20:18 . drwxr-xr-x 4 root root 4096 Mar 10 20:18 .. -r--r--r-- 1 root root 1279 Nov 19 1998 data.pm -r--r--r-- 1 root root 3827 Aug 6 2001 file.pm -r--r--r-- 1 root root 17014 Oct 26 2001 ftp.pm -r--r--r-- 1 root root 1823 Apr 9 2001 GHTTP.pm -r--r--r-- 1 root root 5783 Nov 19 1998 gopher.pm -r--r--r-- 1 root root 8459 Oct 26 2001 http10.pm -r--r--r-- 1 root root 10566 Sep 20 2002 http.pm -r--r--r-- 1 root root 1822 Oct 26 2001 https10.pm -r--r--r-- 1 root root 1236 Nov 16 2001 https.pm -r--r--r-- 1 root root 4190 Mar 19 1999 mailto.pm -r--r--r-- 1 root root 3749 Nov 19 1998 nntp.pm -r--r--r-- 1 root root 630 May 5 2001 nogo.pm
LWP only supports a certain list of protocols. mms:// is not one of them. One could certainly learn about the protocol and write mms.pm for LWP, but it appears that no one has done so at this time. If you follow this example, the problem should become more clear:

# Create a user agent object use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->agent("MyApp/0.1 "); # Create a request my $req = HTTP::Request->new(POST => 'http://www.perl.com/cgi +-bin/BugGl impse'); $req->content_type('application/x-www-form-urlencoded'); $req->content('match=www&errors=0'); # Pass request to the user agent and get a response back my $res = $ua->request($req); # Check the outcome of the response if ($res->is_success) { print $res->content; } else { print "Bad luck this time\n"; }
Note the creation of an HTTP::Request object. --isotope
http://www.skylab.org/~isotope/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://251558]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found