Page counter and ip address recorder.

I am creating a website and i want to create a database that will record the ip address and possibly other details of people that visit my website. i want to have a counter which will count the number of unique visitors to my site. my friend told me i should go about this through php but i dont know too much about how to set up a database on my webserver or to write the code although i have found some bits on the web. how can i create a database on my server and get the page to update it whenever someone new visits it.
aidanmcg34Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jkna_gunnCommented:
if your using php normally mysql would be the database to use, see if your web hosting company supports that and if so ask them to set it up.

id look at the php.net site it can help you with the basics:
http://au.php.net/manual/en/ref.mysql.php has example of how to connect to a sb and retrieve results from it and display them on a page.

http://au2.php.net/manual/en/reserved.variables.php#reserved.variables.server

will show you a list of variables you can access to get information about someone visiting your page. in your case you wanted the IP, well that would be by calling $_SERVER["re
0
jkna_gunnCommented:
(accidently pressed submit)
... would be by calling $_SERVER["REMOTE_ADDR"];



0
aidanmcg34Author Commented:
the first problem i have is getting a server. i have nowhere to put my site as i cant find a server that wont charge me for hosting php pages and as i only need one for 2/3 weeks there is no point in paying for it.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

jkna_gunnCommented:
do you have a broadband connection? you could host the site yourself if its just for a few weeks.
if your on a dynamic ip get an account from a company like no-ip.com.

you can install php and mysql on your own computer.

0
aidanmcg34Author Commented:
will that cost me anything and i just have a 56k dial up but its only for me to view so i can test my php code and the database.
0
jkna_gunnCommented:
no the account from no-ip.com is free i use it myself, you basically get a subdomain from them like {yourname}.no-ip.org that will point to your computer.
a little bit of software you download from them will autmatically update your IP address when it changes.

you will also need to download php, mysql and apache.
install apache first, then php, instructions can be found on the apache site http://httpd.apache.org/
php can obviously been downloaded from php.net (im using 4.3.9).
mysql from mysql.com.

all these come with documentation on how to install.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.