View Full Version : <<< Any Website Developers here?? i need help!!>>
panacea_amc
14-01-2007, 07:39 PM
hello people,
i am a newbie to this website buisness. i am setting up a website for my personal use. its = http://panacea.3-hosting.net
my purpose is ONLY to tack the I.P. address of the visitors to my website. si there any specific software for this purpose?
in my site, i have da following folders and files.:
1.sns_collector = folder
2. images = folder
3 index.html = file....
please help me how to proceed?? thanx!!!
ahref
14-01-2007, 07:57 PM
tracking ip address is one line php code, do your server support php?
panacea_amc
14-01-2007, 08:15 PM
ya....it supports php..but i m a complete newbie nad dont know anything abt writing code.....plz kindly tell me where to write code.....and then how can i know the ip address....
thnx
ahref
14-01-2007, 10:01 PM
Write this in text file, name it ipadd.php
<?php
print $_SERVER["REMOTE_ADDR"];
?>
upload it on your server, then open it in browser.
ajayashish
14-01-2007, 10:59 PM
Write this in text file, name it ipadd.php
<?php
print $_SERVER["REMOTE_ADDR"];
?>
upload it on your server, then open it in browser.
What this really helps in
Ricky
14-01-2007, 11:41 PM
will print IP address of the client opening the page.
Btw, you first buy a PHP book and read it for a month .. you wil really love it then.
panacea_amc
15-01-2007, 10:31 AM
Thank u Ahref for the code......the code displayed the i.p. address of the visitors to my site........now if i want to know the ip addresses of those visitors, how is that possible?....does this data get stored in my site(server) or somewhere else?????
thanx agagin.....
ahref
15-01-2007, 11:50 AM
You have to store the data, through script. You can store it table or text file.
panacea_amc
15-01-2007, 01:40 PM
thanks Ahref again, but can u kindly mention the steps of storing the data thru scripting or as a text file...???
i believe thnx will not b enuf for u .
thnx again!!
Choto Cheeta
15-01-2007, 02:02 PM
well there are 3rd party techniques to get that data,
one is, http://www.statcounter.com
there it will give u a code which u have to place at ur pages, that code may be invisible or visible as a counter of ur page views, after u place the code in ur site u can get Stats from the stat counter control panel...
or many hosting comes with web stat software such as webziller... look for a Stats in ur hosting panel...
what software u r using ?? cPanel ??
ajayashish
15-01-2007, 02:05 PM
statcounter is a better option
anilmail17
15-01-2007, 02:35 PM
<?php
$fp=fopen("ipstat.txt","a+");
$fwrite($fp,date('Y-m-d H:i:s').$_SERVER["REMOTE_ADDR"]."\n");
fclose($fp);
?>
then read the ipstat.txt from your control panel or web browser
ajayashish
15-01-2007, 02:38 PM
where to write this code
desertwind
15-01-2007, 02:56 PM
rename your index.html as index.php
then write this code inside the <body></body> tag.
ajayashish
15-01-2007, 03:27 PM
can we have any alternate to see without going in control panel and seeing the TXT
like echoing the txt file on a html page
desertwind
15-01-2007, 04:04 PM
of course you have.
<?php
$fp=fopen("ipstat.txt", "r");
while ( $line = fgets($fp, 1000) ) {
print $line;
}
fclose($fp);
?>
save this file as stats.php and open in your browser.
ahref
15-01-2007, 04:23 PM
Great, complete program has been developed.
panacea_amc
15-01-2007, 06:07 PM
guys!!! please wait....u must be some gurus in programming...but i a newbie
where is the "ipstat.txt" file??? wht is the control panel??? i am not unerstanding these things>>>>
i i want to know who r visiting my site ONLINE.....please explain the steps elaboratley....thanks buddys!!
kalpik
15-01-2007, 06:30 PM
ipstat.txt file will be created automatically.. And forget about control panel.. just type http://panacea.3-hosting.net/ipstat.txt to view the IPs.
desertwind
15-01-2007, 06:30 PM
Well, your question is answered already in this thread. For your sake repeating again.
1. Rename your index.html (or index.htm) to index.php
2. Put the following code just after the <body> tag
<?php
$fp=fopen("ipstat.txt","a+");
$fwrite($fp,date('Y-m-d H:i:s').$_SERVER["REMOTE_ADDR"]."\n");
fclose($fp);
?>
3. Create a new page stats.php and insert the following after the <body> tag
<?php
$fp=fopen("ipstat.txt", "r");
while ( $line = fgets($fp, 1000) ) {
print $line;
}
fclose($fp);
?>
4. Open www.yoursite.com/stats.php for the status
5. Voila!
Pretty simple isn't it ?
thanx 4 this info ........ php is indeed great ......... any good book ?
panacea_amc
16-01-2007, 01:00 AM
thank you people for bearing with me, especially Desertwind: thanx buddy, ur too good!!
thanx all n keep this forum rocking!!
__________
some more querries:::
i managed to get the I.P. address of my fren live chatting. he was from barelli..but when i used his i.p.to find out the location (city)...it showed bangalore....i used http://www.geobytes.com/IpLocator.htm?GetLocation
for findin the location.....is there any way of 100% effective correct reporting of the location concerned?
thnx again
Ricky
17-01-2007, 03:29 PM
No , there is no 100% way to get accurate information untill the user is having static IP .
If your free hosting provide you cPanel or any other panel then you shld have some stats program already installed under it.
i am talking something out of the post query... i am sorry
dear panacea ur site seems interesting but why are u using 3-hosting... that to with ads... move to 110mb.com no ads adn fully professional features...
go to www.110mb.com for more
-SUDE
panacea_amc
17-01-2007, 09:55 PM
hey sude, u said u found my site interesting!!!
I had only ONE thing in my site and that was......
Well....m i rite in guessing???
Ok. I will check out 110mb.com
tuxfan
18-01-2007, 12:15 PM
thanx 4 this info ........ php is indeed great ......... any good book ?
Plenty of them. But you will surely find e-books ;) Search for them is all I can say openly :p :D
But also get hold of a copy of php manual from www.php.net. If you know C/C++/Java then you will feel at home in PHP. The basic syntax, loops, etc. is same.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.