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.
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.

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 site it can help you with the basics: has example of how to connect to a sb and retrieve results from it and display them on a page.

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
(accidently pressed submit)
... would be by calling $_SERVER["REMOTE_ADDR"];

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.
Upgrade your Question Security!

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

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

you can install php and mysql on your own computer.

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.
no the account from is free i use it myself, you basically get a subdomain from them like {yourname} 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
php can obviously been downloaded from (im using 4.3.9).
mysql from

all these come with documentation on how to install.

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

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.