-
PHP: Help needed
OK!
For a while now I have been thinking. Why don't people get paid for sharing files and images? So I was thinking, if you paid "x" per unique view if it was direct and 2x "x" per share url (it would have adverts on)
Anyway can anyone suggest a way of logging the views of a file...
EG)
I post a image on here. Every time the page is loaded it logs it down onto my server.
+rep for any helpful links/help
Edited by Lµke (Forum Moderator): Thread moved from Website Designing. Please post in the correct section next time, Thanks :).
-
I like the idea, but i don't think you can log visiter actiity on someone elses website, and log it on yours ?
-
You can, quite a lot of stats websites use the same concept.
htaccess would have to be used
-
Concept would never worj because of forums and auto-refreshing pages.
you could technically build it into a (gif/png/etc.) image with PHP and use mod_rewrite to make it that type. Each time the image code executes, it adds 1 to either a mysql database or logs it in a basic file.
I could try making it, I've done something almost identical to it before...
-
Logging the views is pretty simply done, i belive dinamic images will work in sigs, so easiest way would create a dinamic loader, aka image.php?img=somthing.jpg
Then just add the headers to stop caching and set the relivent image load type, and include the image you want in to the script. Then also in the script set up a simple logger to count unqiue ips for what ever image etc you want it to. Easy as pie :D