Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 18th, 2003, 01:11 AM
hiwired hiwired is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 25 hiwired User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb Hit Counter Help

I just created a counter in PHP, and was wondering how I would be able to make other websites (which are located on different servers) of mine be able use the same statisitcs/counter. If you don't get my drift, I am almost trying to accomplish a remotely hosting counter service.

Counter Info

There are two files: counter.php, counterlog.txt
If a visitor comes, it opens up the counterlog.txt and it increments. I put an include statement where I want the counter to show.

Can you guys help me by answering these questions:

1. What language would I use?
2. Would I call it with JavaScript's script src?

If you want, you could also be so kind to write me the script (or at least some of it)

Reply With Quote
  #2  
Old August 18th, 2003, 07:35 AM
computer's Avatar
computer computer is offline
echo $usertitle['computer'];
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Jan 2003
Location: UK
Posts: 6,675 computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 4 Weeks 9 h 12 m 10 sec
Reputation Power: 219
Send a message via ICQ to computer
if the other peoples sites have php you can just do <? include("http://www.yoursite.com/counter.php"); ?> on the pages you want to increment a counter...

If you want to have different counters for different sites, I suggest you do the following:
1. create a folder called "counterlog"
2. replace "counterlog.txt" with "counterlog/" . $_GET['site'] . "_log.txt"
3. create text files like "www.mysite.com_log.txt" for each site, changing the domain each time.
4. include on the site: <? include("http://www.yoursite.com/counter.php?site=www.mysite.com"); ?>

hope that helps,
computer
__________________

Reply With Quote
  #3  
Old August 18th, 2003, 11:22 AM
hiwired hiwired is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 25 hiwired User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i want people who have hosts that don't support php to be able to use it as well.

Reply With Quote
  #4  
Old August 18th, 2003, 12:30 PM
computer's Avatar
computer computer is offline
echo $usertitle['computer'];
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Jan 2003
Location: UK
Posts: 6,675 computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level)computer User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 4 Weeks 9 h 12 m 10 sec
Reputation Power: 219
Send a message via ICQ to computer
well use server side includes or javascript includes then

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Hit Counter Help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT