Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

(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
NodeReaper wonders through a maze of twisty little sayings, all alive

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2018-01-21 01:50 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.