Page 1 of 1
PLEASE HELP ME!!!
Posted: Mon Sep 15, 2003 10:46 am
by giggle
hello i have a question - do you know a script for PHP that will tell you how many views a page has had.
for example, i have a link, beside it, it says how many views the linked page has had. please could you reply ASAP
Posted: Mon Sep 15, 2003 10:49 am
by JayBird
thanks but it didn't help!
Posted: Mon Sep 15, 2003 10:57 am
by giggle
the link you gave me several options, the only free options were not avaliable for download.....do you know the actual PHP code?
just a simple code for say
Photo Gallery (5,776 Views)
Music Library (654 Views)
it is quite urgent sorry
Posted: Mon Sep 15, 2003 11:04 am
by igoy
listen to me dear friend,
go to EvilWalrus[link]
http://www.evilwalrus.com/ [/link]
and have fun with all treasure of all free scripts you can use.
Posted: Mon Sep 15, 2003 11:13 am
by giggle
yea mate its great and all i have used before i just cant find a particular script, as a newbie i cannot really compile my own so i was wondering if anybody could help me
thanks anyway old friend
Posted: Mon Sep 15, 2003 11:54 am
by SantaGhost
well i could be quite easy if you know a little mysql and can add a new table and row, to simply add a number to the database and read it out.
you could also store the values in a text/php file and rewrite it everytime someone visits.
Posted: Mon Sep 15, 2003 3:19 pm
by m3rajk
SantaGhost wrote:well i could be quite easy if you know a little mysql and can add a new table and row, to simply add a number to the database and read it out.
you could also store the values in a text/php file and rewrite it everytime someone visits.
textfileissue: what happens under race conditions?
Posted: Mon Sep 15, 2003 3:49 pm
by SantaGhost
m3rajk wrote:SantaGhost wrote:well i could be quite easy if you know a little mysql and can add a new table and row, to simply add a number to the database and read it out.
you could also store the values in a text/php file and rewrite it everytime someone visits.
textfileissue: what happens under race conditions?
yes now i think about it its not a suitable solution for this problem.... if 100 users try writing to the same file at the same time.... (if thats what youre referring to)
Posted: Mon Sep 15, 2003 4:17 pm
by m3rajk
eactly.
race condition is when more than one process need the same set of resources.
if it's available for all to read then they write without re-reading you corrupt the resource. most scripting languages can't deal with that. programming languages do in a way thatis talking to a machine on a much lower level.
perl is the only scripting lang i know that can talk on that level
Posted: Tue Sep 16, 2003 3:10 am
by twigletmac
giggle wrote:yea mate its great and all i have used before i just cant find a particular script, as a newbie i cannot really compile my own so i was wondering if anybody could help me
thanks anyway old friend
Basically this is not a write-me-a-script service, nor is it a find-me-a-script service. If you have code you are struggling with we can help you with that but we really need to see some effort on your part.
Take a look at the suggestions that have been put forward and attempt to code your own version. If you need to start at the very beginning, try a tutorial from a site such as:
http://www.phpcomplete.com
http://www.devshed.com
http://www.phpbuilder.com
Mac