I will try and lay this down as simple as I can, then I will put down the ways I am thinking of doing it. Please note I am looking for an efficient way to do it aswel as an easy one. The main objective is not getting my MySQL password.
The idea is:
- A user of my site takes a script from my site to put on theirs.
- The script will add 1 to the pageview count inside a MySQL table.
My plans:
PHP
There is a PHP file that uses $_POST['uid'] (THE USER ID) to a seperate script on my server. The script on my server will then GET the uid and add +! to the pageview count column in MySQL.
Again, If someone can explain how I can make a PHP script post to another one please tell me. Is this possible without making the user changing pages?
API system
I am not too keen on an API system, but if it works well and is relatively easy to set up an maintain, could someone please point me i the right direction?
Thankyou for your help so far.
Alex
|