Use Separate Game Purchase & Download Pages (Like buy.php Or download.php)

I’ve got and seem some people using pre-made “buy now” links that are terribly long. Links like: https://www.ecommerceprovider.com/product.cgi?id=12345

Why not use link like this:
www.yourgamesite.com/game/buy.php

Have this type of code in your “buy.php” file: (you can use .cgi or .asp or whatever suits you)

< ?php
// buy.php
// this code will redirect visitor to your ecommerce provider's site
header("location:https://www.ecommerceprovider.com/product.cgi?id=12345");
?>

Basically what you’ve done now is that instead of using the direct link to eCommerce provider’s site (where people pay the game online) you are using a buy.php file in your own site to redirect the player to the shopping place.

  • With little trick like this, you don’t have to worry about PAD or review sites getting the link wrong if you decide to change eCommerce provider or need a new purchase link.
  • If you always give www.yourgamesite.com/game/buy.php to these review sites, then you can easily change the link in the file to match your current eCommerce provider.
  • Downside is that your site must be online or people won’t be able to get to the buying site.
  • The additional bonus is that you can track the buy page hits better when it goes through your own site.

The same goes with the download link: instead of having “www.yourgamesite.com/game/setup.exe” you could have “www.yourgamesite.com/game/download.php” and forward it to “setup.exe”.

Hightailed’s buy link www.hightailed.com/buy.php and download links www.hightailed.com/download.php are done like this, and basically it just redirects visitor to shopping cart (or to download site). If I ever consider changing to another eCommerce provider like Plimus or RegNow it’s very easy to me to do the code change – all I need to change is one link in the buy.php file – and any sites that have linked to Hightailed’s buy page are automatically okay. If I want to use different name or different folders for “setup.exe”, it would be easy to change.

10 thoughts on “Use Separate Game Purchase & Download Pages (Like buy.php Or download.php)

  1. yep done as suggested now, good idea thanks. Only thing is for the mass shareware site submission (via Pad file) I’m about to do, you can’t end it php, you have to end in .exe or .zip :-(

  2. That’s a really cool idea! Especially the statistics stuff you can do with that ;) thanks

  3. I’m using links such as:
    http://www.frozax.com/atw/*/aroundtheworld.dmg
    I can put anything in place of the * and by using URL rewriting and php, I redirect this URL to the real binary file and logs the id (the *) in my logfile. That way, download sites that do not accept php files for download links will take my links and I can perform php stuff. They think it’s a direct link.

  4. I do this for my purchase pages, but what about for download pages? I thought that a lot of download sites only allow direct links for the game files. It’s not a big deal anyways because as long as the URL is pointing to your server you can do a redirect.

  5. You don’t need additional page. But, .php can do some statistics stuff (like check where visitor came from and stuff like that)

  6. Nice tip, but I don’t see why you need an additional page. You can just direct directly from .htaccess, even if yoursite.com/game/buy doesn’t exist, you can set up to redirect from there.

  7. @Jetro: nooo… we should *always* use PHP ;)

    Eh seriously – your advice is so true. You could simply have /buy/ and then put index.php there (or use .htaccess stuff) to redirect.

  8. …not to mention that with this method, you can keep track of your customers ;-)

    The “buy.php” or “download.php” page could first create a record of the user’s demographics to a db file before redirecting him/her to the setup file…

    php code that does this is available, upon request :)

  9. great advice thanks. I’ll bookmark this page.

  10. For the same reason (what if you switch provider/tech), you shouldn’t use “.php” in links, but just e.g. “www.yoursite.com/game/buy”. You can easily set up that with .htaccess RewriteEngine, either to redirect to the eCommerce provider, or to your internal web page (buy.php).