Jump to content

How to allow headers to download php code?


jdock1

Recommended Posts

I made a php mail script, but I want it to be made so the user can enter his email address in the text box, then when he clicks submit it generates the php file for him, the email address he entered is hardcoded in the file by using a $_GET variable..

 

I already tried that with this code on top

 

header("Cache-Control: no-cache");
header("Expires: -1");
header("Content-disposition: attachment; filename=\"send.php\"");
header("Content-type: application/octet-stream");

 

...but it downloads the html, no php code.

 

Is this possible?

 

Everybody is looking for a php mail script, its so easy to code , but webmasters that dont know shit about php will look around for one.

 

This way, the idiot who doesnt know php doesnt have to actually go into the php code and put their email address in their manually

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.