Staggan Posted December 20, 2013 Share Posted December 20, 2013 Hello Is there any way I can append a reference to a file before it is downloaded..... So, if my file is called installer.exe can I append something to it like this... installer_1.exe ? This would allow my installer to know which partner referred that person to my installer... Or does anyone have any other suggestion, without having to make a custom installer for each referrer Thanks Link to comment https://forums.phpfreaks.com/topic/284875-appending-reference-to-file-before-download/ Share on other sites More sharing options...
MDCode Posted December 20, 2013 Share Posted December 20, 2013 If you're using the standard php download: <?php $referrer = 1; // Along with the others header("Content-Disposition: attachment; filename=installer_{$referrer}.exe"); ?> Link to comment https://forums.phpfreaks.com/topic/284875-appending-reference-to-file-before-download/#findComment-1462823 Share on other sites More sharing options...
Staggan Posted December 20, 2013 Author Share Posted December 20, 2013 Thanks... I would normally use a link... so I am unsure how the above works? Can you explain?Thanks Link to comment https://forums.phpfreaks.com/topic/284875-appending-reference-to-file-before-download/#findComment-1462829 Share on other sites More sharing options...
Staggan Posted December 20, 2013 Author Share Posted December 20, 2013 I have it working now.. I did not realize PHP could handle the downloads as opposed to just using a link.... Thanks for the help Link to comment https://forums.phpfreaks.com/topic/284875-appending-reference-to-file-before-download/#findComment-1462833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.