PDA

View Full Version : Execute HTTP statement into HTML/PHP


FrancoisC
11-18-2004, 10:42 AM
hello

I do know how to trigger a Download process from HTML via a link like <a href="http://tructruc.free.fr/xxxx.DOC" >Charger mon CV</a>.

I am looking for accomplishing the same action (of Downloading, of executing astraight HTTP statement) from PHP WITHOUT any person action, without clicking on something.

Would anyone like to explain to me how to do this?

Thank you in advance.

F

senshi
11-18-2004, 01:07 PM
OK, let me get this straight...

Your asking about http:// downloading by making a request using PHP.

Are you looking are making up a CGI interface?

(Hint)

zach1234
11-18-2004, 05:48 PM
You can use "onload" (javascript trigger), which can be fired at the time you are loading the body of the page.

Here is an example:
<body onload="window.location.href='anotherpage.php'">

This will redirect the execution to anotherpage.php.

There are other "not human" events, but not many.

FrancoisC
11-19-2004, 05:53 AM
hi Senshi, hi Zach

Thank you for your answers first.

To me more precise, I now have a button into a page of my site to offer a download (my CV) to anyone; this "anyone" has to click on the button, for sure.

I need to rework this page and make the download automatic.

This is the reason why I need to be able to have the correponding HTTP statement executed upfront with no human action.

Anyone knows how to do this?

FC