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

(OT) php pointer please

by blowupp (Novice)
on Jun 23, 2009 at 10:45 UTC ( #773959=perlquestion: print w/ replies, xml ) Need Help??
blowupp has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks
Strictly not a perl question but I believe you might spare a nugget of knowledge:

I would like to copy the method of downloading from a site I came across.
The two HTML links point to the same file -one plays in page whereas the other has .php appended - resulting in forced download.
Tips on how I should get php to accomplish this much appreciated.
regards Mark
<p>Product specialist, Bob shows you how.</p> <p class="RelatedLinks">Play - <a href="/products/mocha_for_After_Effe +cts/Mocha_image_stabilization.mp4">High res.</a>(164.70 Mb)&nbsp;</p> <p class="RelatedLinks">Download - <a href="/products/movies/Mocha_ima +ge_stabilization.mp4.php">High res.</a>(164.70 Mb)&nbsp;</p>

Comment on (OT) php pointer please
Download Code
Re: (OT) php pointer please
by targetsmart (Curate) on Jun 23, 2009 at 10:51 UTC
Re: (OT) php pointer please
by superfrink (Curate) on Jan 11, 2010 at 23:16 UTC
    This doesn't seem like a PHP question to me. The download behaviour probably has to do with the mime type sent by the server. It could also be controlled by the browser based on file extension. You can check the server headers using a tool like firebug.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://773959]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-12-27 17:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (177 votes), past polls