Simple project-sharing page (open source) in PHP

When reading a great article from the creators of Soma Water about how they raised $100,000 in 10 days on Kickstarter, the shared the idea of this share-page that they sent to their closest friends & supporters to ask them to share the project with their friends.

The little landing page was cute, functional, and very simple. I thought it’d be great to do something like this for the launch of Othello on Steam. Since the source was all right there & formatted beautifully, I figured it’d be worthwhile to make a PHP script that would output the same kind of page based on a very easy configuration so that non-coders could get that great landing page with very little effort or programming ability.

See it in action

Here is an example of the page in-action, for our recent release of Othello:
simple share page for Othello on Steam
(click image to view the page)

Use it for yourself!

  1. Download the and unzip it.
    *hashes of zip file:
    md5: 512EEC59969F051BD1513E05DD24E7B7
    sha1: 8314161C9FC4A7FECC583F8B7B290838C13BADE3
    If you don’t know what these hashes are for, just ignore them.
  2. In the folder you just extracted, there is an index.php file with configuration code at the top which you have to fill in. The comments will help you figure out what to put there (there is also an example). Open index.php in a text-editor to do the configuration.
  3. Place the entire “share” directory on your webserver where you want the page to be located.
  4. View the “share” page in your browser (the URL will depend on where you have uploaded the directory. For example, we uploaded the “share” directory to the main directory of our webserver and the page is located at:

Technical details

All this page should require in order to work is a PHP server and the directory that we provided in the zip file above.

We started by just copying the html/js/css straight-up, then went on to make it configurable and tried to improve various little aspects so that everyone can get a great sharing page without having to mess with it. The original page was made in 2012, so some things were just updated a smidge. Some changes we made:

  • Made the entire thing configurable at the top of the file so you only need to look in one spot.
  • Made some slight performance improvements like moving the javascript to the bottom of the page, removing an external HTTP request, and adding caching headers.
  • Made the single script capable of building the share pages for multiple projects (so you won’t need a separate copy of this tool for each project; just an extra section in the config).
  • Updated the google analytics code to the more recent code.
  • If the configuration wasn’t set up yet, hitting the page will show instructions on configuring it.
  • If more than one project exists, but none was specified in the URL, will show a list of projects.

Please remember that while I made the configurable open-source script, the entire idea and the page design/functionality all came from Soma Water who was kind enough to share it with the world. Check them out. 🙂

If you are in a sharing mood and want to share the project that resulted in us making this page, please check out this page: share Othello.

– Sean