I have an existing custom PHP script which operates via a basic admin panel and one MySQL table. Essentially it allows me to add a URL linked to a title/description and a php redirect e.g. [url removed, login to view] The redirect link acts as a counter setting a cookie to record unique clicks which are displayed in the admin panel.
I need this basic script to be updated with a couple of new features.
1. Random Link
Instead of being limited to just one destination url for each redirect I would like to be able to add multiple urls. I would then like to set a percentage for each destination url
[url removed, login to view]
URL 1 - [url removed, login to view] (50%)
URL 2 - [url removed, login to view] (25%)
URL 3 - [url removed, login to view] (25%)
So it is the same redirect string randomly being assigned to each destination URL with a weighted %. An indivdual counter should display total clicks for each destination url.
2. Redirect Function
Currently the redirect is achived via a 302 Temporary Moved (header Location) which has some implications for Google indexing. I would ideally like to change this to another redirect method i.e. one that doesn't redirect but simply loads the destination url in the same way as clicking on an href link.
As I have this script implemented on a number of sites I would like to be able to update it without too much disruption and obviously keep the current db information.
It's a small job therefore I would like it completed within a day or so.