PLEASE HELP ME!!!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
giggle
Forum Newbie
Posts: 3
Joined: Mon Sep 15, 2003 10:46 am
Location: Manchester, England, UK

PLEASE HELP ME!!!

Post 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
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

giggle
Forum Newbie
Posts: 3
Joined: Mon Sep 15, 2003 10:46 am
Location: Manchester, England, UK

thanks but it didn't help!

Post 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
User avatar
igoy
Forum Contributor
Posts: 203
Joined: Fri May 02, 2003 11:57 pm
Location: India
Contact:

Post 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.
giggle
Forum Newbie
Posts: 3
Joined: Mon Sep 15, 2003 10:46 am
Location: Manchester, England, UK

Post 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
User avatar
SantaGhost
Forum Commoner
Posts: 41
Joined: Mon Sep 15, 2003 11:54 am

Post 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.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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?
User avatar
SantaGhost
Forum Commoner
Posts: 41
Joined: Mon Sep 15, 2003 11:54 am

Post 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)
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
Post Reply