Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Perl vs. PHP in streaming a file

by krkeegan (Novice)
on Nov 24, 2004 at 21:12 UTC ( #410249=note: print w/replies, xml ) Need Help??


in reply to Re: Perl vs. PHP in streaming a file
in thread Perl vs. PHP in streaming a file

Thanks for your help so far. To the response of 280kbps I get the same speed out of my machine too with the perl script but for some reason the Tivo box really lags when I use perl, but not with php. My assumption is that the data is not reaching it fast enough, since this is a streaming file, but it could be another problem too. I am just trying to figure out what is different with PHP and perl in this respect.

And to answer the question why I don't use apache. I actually am, TiVo and the homemedia option always use an alias http://server/TiVoConnect so in order to make it function right I have to use a script to be able to determine what is a query or what is a data transmission.

Thanks again.

Replies are listed 'Best First'.
Re^2: Perl vs. PHP in streaming a file
by revdiablo (Prior) on Nov 24, 2004 at 21:47 UTC
    TiVo and the homemedia option always use an alias http://server/TiVoConnect so in order to make it function right I have to use a script to be able to determine what is a query or what is a data transmission.

    According to a document I found on TiVo's website, the TiVo uses two different request formats:

    http://{machine}/TiVoConnect?{parameters}
    Meta-data requests
    http://{machine}/TiVoConnect/{document}?{parameters}
    File requests

    These are different enough that you could use Apache's mod_rewrite to direct file requests directly to the file, and then you would need neither PHP nor Perl to serve them.

Re^2: Perl vs. PHP in streaming a file
by Ven'Tatsu (Deacon) on Nov 24, 2004 at 21:36 UTC
    If your getting that high throughput I'd venture a guess that speed is not your issue. Is your script running on windows? If you are running on Windows you will almost cretanly need binmode(filehandle). I didn't see it in the code you posted. With out it Perl will open the file assuming that it is text and it will likely corrupt it as it's read.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2022-10-06 01:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (26 votes). Check out past polls.

    Notices?