Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

(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>

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://773959]
Approved by planetscape
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2017-10-20 06:04 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (259 votes). Check out past polls.