Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Download and Redirect
#1
I dont know very much at all about php, and i was wondering... Is there some way I could have a script download a file, and then redirect to another page? Im wanting to sell something on a site, so I would have them click a buy button which would go through paypal. After the transaction is complete, paypal would redirect to this script to download the file. And since the script redirects to another page, they shouldnt be able to see the script's location, or the downloaded file's location, right?
Reply
#2
Do you plan on just selling one thing, or lots of different products? Creating a paypal button will do all of the above you mentioned for you. Smile
At the top will be the same place you hang from.
Reply
#3
I want to sell multiple products, but all of them are going to be digital media
Reply
#4
so what exactly do I need?
Reply
#5
what I have used for selling ebooks on ebay years ago.

PHP Code:
<?php

$youremail 
"youremails@emaildomain.com";
$downloadfile "atkins_ebooks.zip";
$hostname gethostbyaddr($REMOTE_ADDR);
$date date("D, m-d-y");
$time date("g:i A");


extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
$nilc=explode(".",basename($download));
if(
$download!=""){
$name=strtolower($download);


mail($youremail,"ebay customer downloaded $downloadfile","Ebay Customer downloaded $downloadfile \n\n IP: $REMOTE_ADDR ($hostname) \n $HTTP_USER_AGENT on $date at $time \n From: $HTTP_REFERER \n\n\n NAME: $name","From: $name <$email>") or die("email error");
echo 
"<BODY BGCOLOR=#000000 TEXT=blue LINK=blue VLINK=blue ALINK=blue></BODY><FONT FACE=fixedsys><center>";
echo 
"Dear Customer, <br>";
echo 
"Thank you for purchasing my products from ebay :) <p>";
echo 
"Here is your download. <p>";
echo 
"<a href=$downloadfile><font size=+10>Here</a></font>";

} else {

mail($youremail,"Access Denied to $downloadfile","Access Denied to $downloadfile \n\n IP: $REMOTE_ADDR ($hostname) \n $HTTP_USER_AGENT on $date at $time \n From: $HTTP_REFERER","From: $name <$email>") or die("email error");
echo 
"<BODY BGCOLOR=#000000 TEXT=blue LINK=blue VLINK=blue ALINK=blue></BODY><FONT FACE=fixedsys><center>";
echo 
"Access Denied";

}


?>
Reply
#6
There are lots of paypal compatible digital download scripts. Not too many good free ones but they exist.

How about a 3rd party resource like this?
https://express.payloadz.com/?mode=adv

Their pricing structure is cheap too.
https://www.payloadz.com/account/levels.asp
Superman I am here to rescue you.
This is Support Forums not Support PMs.  Do not PM me for support unless it's private and site related.
Reply
#7
Or, if you have a website or something, set up this awesome shop called OpenCart:
http://www.opencart.com/
It will allow you to host multiple things for sale and everything.
At the top will be the same place you hang from.
Reply
#8
Awesome... does it do digital media downloads though?
Reply
#9
Use Javascript to prompt for a download is my suggestion.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)