![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Apr 2006
Posts: 1
Rep Power: 0
![]() |
So I believe the easiest way to do these would be with js, but I am not proficient with it.
I am wanting to make an ip display for users to see on my site, but I'd like it in this format "Welcome 'ip address'" I don't want a box around it, I would like it best to be placed in the normal body text. Along with that I am trying to find a site counter, that doesn't offer a ton of stats. I just want a simple counter - simple gui - very simple. Just to count the visits to the site by unique IP's. If anyone can help it'd be really appreciated. :banana: -toole |
|
|
|
|
|
#2 |
|
Professional Programmer
|
I can't really help you with your first question, but as for your second: http://www.statcounter.com/ << everything you need, right there.
__________________
The world's first athletic computer geek! The home of PrProgramsStudios How not to post a question: <-- Please don't reply |
|
|
|
|
|
#3 |
|
Hobbyist Programmer
|
are you talking about something like what is on this site www.admins101.com
how it has got the box that shows your ip address? |
|
|
|
|
|
#4 | |
|
Expert Programmer
|
Quote:
As for showing the IP, its easy with php (google) but if you want it in javascipt, look here: http://javascript.internet.com/user-...p-address.html just edit that code to display the ip where you want it on the site. simple. |
|
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
if you look on the left side of that page it has a box that shows your i[p address that you are on. that is what i was showing him.
|
|
|
|
|
|
#6 |
|
Programming Guru
![]() ![]() ![]() |
in PHP, its very easy... not too sure about javascript.
$userip = $_SERVER['REMOTE_ADDR']; echo "Welcome $userip"
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#7 |
|
Expert Programmer
|
@demon101 - yup, I saw that. I still think the page was cool :p the background is what caught my eye.
@IR - that code looks familar I just couldnt recall it, and was too lazy to google it. |
|
|
|
|
|
#8 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
If you want to accomplish the ip thangy in script on the client, just:
HTML content: This is normal HTML text, and we just want to say, Welcome <script type=blah...> document.write (ip); </script>.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|