DIGIT-ARC read-only archive · snapshot: July 23, 2026

<<< Any Website Developers here?? i need help!!>>

30 posts · originally from https://geek.digit.in/community/threads/any-website-developers-here-i-need-help.46427/

panacea_amc
panacea_amc Original post #1
Jan 14, 2007 at 7:39 PM
hello people,
i am a newbie to this website buisness. i am setting up a website for my personal use. its = *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
ahref #2
Jan 14, 2007 at 7:57 PM
tracking ip address is one line php code, do your server support php?
panacea_amc
Jan 14, 2007 at 8: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
ahref #4
Jan 14, 2007 at 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
Jan 14, 2007 at 10:59 PM
ahref said:
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
Saahib
Saahib #6
Jan 14, 2007 at 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
Jan 15, 2007 at 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
ahref #8
Jan 15, 2007 at 11:50 AM
You have to store the data, through script. You can store it table or text file.
panacea_amc
Jan 15, 2007 at 1: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
Jan 15, 2007 at 2:02 PM
well there are 3rd party techniques to get that data,

one is, *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
Jan 15, 2007 at 2:05 PM
statcounter is a better option
anilmail17
Jan 15, 2007 at 2:35 PM
PHP:
<?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
Jan 15, 2007 at 2:38 PM
where to write this code
desertwind
Jan 15, 2007 at 2:56 PM
rename your index.html as index.php

then write this code inside the <body></body> tag.
ajayashish
Jan 15, 2007 at 3: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
Jan 15, 2007 at 4:04 PM
of course you have.

Code:
<?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
ahref #17
Jan 15, 2007 at 4:23 PM
Great, complete program has been developed.
panacea_amc
Jan 15, 2007 at 6: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
kalpik #19
Jan 15, 2007 at 6:30 PM
ipstat.txt file will be created automatically.. And forget about control panel.. just type *panacea.3-hosting.net/ipstat.txt to view the IPs.
desertwind
Jan 15, 2007 at 6: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
Code:
 <?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
Code:
<?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 ?
panacea_amc
Jan 16, 2007 at 1: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 *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
Saahib
Saahib #22
Jan 17, 2007 at 3: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.
sude
sude #23
Jan 17, 2007 at 8:05 PM
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
Jan 17, 2007 at 9: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
tuxfan #25
Jan 18, 2007 at 12:15 PM
ax3 said:
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.
toofan
toofan #26
Oct 6, 2008 at 6:14 PM
Good advance PHP books really needed. Please can anyone Post the names of Best books on PHP.
Garbage
Garbage #28
Oct 6, 2008 at 6:21 PM
lol... He bumped a year old thread... :D
Faun
Faun #29
Oct 6, 2008 at 6:44 PM
^^lol you are third :D
toofan
toofan #30
Oct 6, 2008 at 9:01 PM
Actually there are very few members comming to the programming section so very few threads compared to other sections. I started reading the threads from the last page. And I find some really interesting so I bumped them to make them live again.:D

But I need Good PHP books with some advance programming.