Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 16th, 2006, 3:39 PM   #1
toole
Newbie
 
Join Date: Apr 2006
Posts: 1
Rep Power: 0 toole is on a distinguished road
Arrow A Couple Small Scripts

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
toole is offline   Reply With Quote
Old Apr 16th, 2006, 6:05 PM   #2
Prm753
Professional Programmer
 
Prm753's Avatar
 
Join Date: Oct 2005
Location: United States
Posts: 447
Rep Power: 3 Prm753 is on a distinguished road
Send a message via AIM to Prm753 Send a message via MSN to Prm753
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
Prm753 is offline   Reply With Quote
Old May 13th, 2006, 10:45 PM   #3
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
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?
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 13th, 2006, 11:01 PM   #4
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Quote:
Originally Posted by demon101
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?
That site looks cool :p Off topic but ok :p

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.
Booooze is offline   Reply With Quote
Old May 13th, 2006, 11:11 PM   #5
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
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.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 14th, 2006, 12:54 AM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,466
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
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."
Infinite Recursion is offline   Reply With Quote
Old May 14th, 2006, 1:43 AM   #7
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
@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.
Booooze is offline   Reply With Quote
Old May 14th, 2006, 8:37 AM   #8
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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>.
where 'ip' is a variable you have previously stuffed with the appropriate string.
__________________
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
DaWei is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:50 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC