Go to Post I never wanted to be a teacher. This was the year I learned that I am one. It turns out mentors are teachers. Oops. - marshall [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-12-2004, 16:42
Mike AA's Avatar
Mike AA Mike AA is offline
Programmer and Mentor
AKA: Mike Aalderink
FRC #3458 (Code Blue)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Holland, Mi
Posts: 698
Mike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to behold
Send a message via MSN to Mike AA
Counter on a webpage

I want to add a counter using code only, not linked off another sites page. I have my server and my site, mike-site.us and I have our Robotics Team site and FLL Team all on the same server. I would like to add the counter to each of them, I have frontpage 2000 and have Windows 2003 Server on the server with the Frontpage extensions installed on it. On a page I use as my homepage when I start firefox home page I have at the bottom the code where its supposed to be but its not working. Anyone have any Ideas?

Also, I would like to setup video sharing for FIRST videos like SOAP does on their site. Kinda as a mirror, I might have to talk to someone on there to make it even easier or official. I have enough space and decent bandwith, I'm on sDSL so not worried about upload speed. Just unsure as to an easy way. I have on my site an Idea using FTP but like how their site is setup.

Thanks,
Mike Aalderink
Team 1654
  #2   Spotlight this post!  
Unread 26-12-2004, 18:00
His Eminence's Avatar
His Eminence His Eminence is offline
Registered User
None #0408 (Roboticks)
Team Role: Webmaster
 
Join Date: Feb 2004
Location: Florida
Posts: 12
His Eminence is on a distinguished road
Re: Counter on a webpage

I don't have much experience in Frontpage, but are you sure the extensions are enabled on your server? What is shown on your front page right now seems to be just some text that says "[Hit Counter]", like something you would see in Frontpage before publishing it to a Frontpage enabled server.

Also, try a different server to test if it's the code's fault, or if it's the server's problem.
__________________
Know.
  #3   Spotlight this post!  
Unread 26-12-2004, 18:14
Brian M. Brian M. is offline
CGA Team USA-Also On FRV Team 30
FRC #0500 (CGA Team USA)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2003
Location: GA
Posts: 20
Brian M. is on a distinguished road
Re: Counter on a webpage

Quote:
Originally Posted by Mike AA
I have at the bottom the code where its supposed to be but its not working. Anyone have any Ideas?
If you just uploaded the file to your server using FTP and didn’t publish the page using the Frontpage Server Extensions or SharePoint Services, that could be the cause of the problem. If you are using Frontpage 2003, make sure you have the correct option selected in the "Remote Web Site Properties" dialog box.

From the Frontpage help file:
Quote:
Remote Web Site Properties
By using the Remote Web Site Properties dialog box, you can specify how you want to publish files and folders from the Web site that is currently open in Microsoft FrontPage to another location. This process is also referred to as publishing from the local Web site to a remote Web site. The dialog box provides options on the following tabs.

Remote Web Site tab

Remote Web server type
Under Remote Web server type, click the type of server that hosts the remote Web site.

FrontPage or SharePoint Services

If the Web server runs FrontPage Server Extensions from Microsoft, SharePoint Team Services v1.0 from Microsoft, or Microsoft Windows SharePoint Services, enter information about the server in the following boxes.

Remote Web site location Type the Internet address, including the protocol, of the remote Web site that you want to publish and files and folders to— for example, http://www.example.com— or click Browse to locate the site.
__________________
[ Team USA/500 : www.CGAteamUSA.org ]
- 2005 SBPLI Long Island Regional Engineering Inspiration Award
- 2005 SBPLI Long Island Regional Website Award
- 2004 UTC New England Regional Leadership in Control Award
  #4   Spotlight this post!  
Unread 27-12-2004, 16:06
Venkatesh Venkatesh is offline
Registered User
FRC #0030
 
Join Date: Jan 2003
Rookie Year: 2002
Location: USA
Posts: 260
Venkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to behold
Re: Counter on a webpage

Just a side question...

I noticed that you are running Apache on MS Windows. That is a niche configuration, but one I have found to be excellent and very usable. My site, endeavour.zapto.org, is also running Apache 2.0.52 under Windows.

But how on earth did you manage to make Frontpage extensions work with Apache on Windows? I have tried all varieties of black, white, and grey-ish magic to get it to work and I have failed each time.
__________________
-- vs, me@acm.jhu.edu
Mentor, Team 1719, 2007
Team 30, 2002-2005
  #5   Spotlight this post!  
Unread 27-12-2004, 16:53
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Counter on a webpage

OK, if you have MySQL. Go into phpmyadmin, make a database (or you can use a pre-existing one), make a table called "hits", in that table have fields:
IP: Varchar(25)
time: Int(14)

On your home page, put this code
PHP Code:
<?php

    
// connect to our mysql server, and select the database
    
mysql_connect("localhost""mysql_username""mysql_password");
    
mysql_select_db("your_db_name");

    
// get the amount of page views
    
$sql    =    mysql_query("SELECT * FROM `hits`");
    
$views    =    mysql_num_rows($sql);

    
// get the amount of unique views
    
$sql    =    mysql_query("SELECT DISTINCT(IP) FROM `hits`");
    
$unique    =    mysql_num_rows($sql);

    
// get the first hit
    
$sql    =    mysql_query("SELECT * FROM `hits` ORDER BY `time` LIMIT 1");
    
$first    =    mysql_fetch_array($sql);

    
// add this hit
    
$sql    =    mysql_query("INSERT INTO `hits` (`IP`, `time`) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."')");

    
// display text
    
echo "There has been ".number_format($views)." page views since ".date("F j, Y"$first['time'])."<br>";
    echo 
number_format($unique)." of those were unique hits.<br>";

?>
IM me if you need more help (MikeWasHere05)
__________________
http://www.mikesorrenti.com/
  #6   Spotlight this post!  
Unread 28-12-2004, 01:42
Mike AA's Avatar
Mike AA Mike AA is offline
Programmer and Mentor
AKA: Mike Aalderink
FRC #3458 (Code Blue)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Holland, Mi
Posts: 698
Mike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to behold
Send a message via MSN to Mike AA
Re: Counter on a webpage

Quote:
Originally Posted by Venkatesh
Just a side question...

I noticed that you are running Apache on MS Windows. That is a niche configuration, but one I have found to be excellent and very usable. My site, endeavour.zapto.org, is also running Apache 2.0.52 under Windows.

But how on earth did you manage to make Frontpage extensions work with Apache on Windows? I have tried all varieties of black, white, and grey-ish magic to get it to work and I have failed each time.
Well, since I cant exactly get the simplest thing like a counter working it seems it might not be working. I am running 2003 server. But yeah everything else is working flawlessly. before I repartitioned my HD and reinstalled (after finding out my XP Pro licence was used up ??!!!??) I had run for 83 or so days since last restart. Then a few days ago a bad power supply, but its back on for good hopefully ready to take on my task of gigs of video.
  #7   Spotlight this post!  
Unread 28-12-2004, 01:45
Mike AA's Avatar
Mike AA Mike AA is offline
Programmer and Mentor
AKA: Mike Aalderink
FRC #3458 (Code Blue)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 1999
Location: Holland, Mi
Posts: 698
Mike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to beholdMike AA is a splendid one to behold
Send a message via MSN to Mike AA
Re: Counter on a webpage

Quote:
Originally Posted by MikeWasHere05
OK, if you have MySQL. Go into phpmyadmin, make a database (or you can use a pre-existing one), make a table called "hits", in that table have fields:
IP: Varchar(25)
time: Int(14)

On your home page, put this code
PHP Code:
<?php

    
// connect to our mysql server, and select the database
    
mysql_connect("localhost""mysql_username""mysql_password");
    
mysql_select_db("your_db_name");

    
// get the amount of page views
    
$sql    =    mysql_query("SELECT * FROM `hits`");
    
$views    =    mysql_num_rows($sql);

    
// get the amount of unique views
    
$sql    =    mysql_query("SELECT DISTINCT(IP) FROM `hits`");
    
$unique    =    mysql_num_rows($sql);

    
// get the first hit
    
$sql    =    mysql_query("SELECT * FROM `hits` ORDER BY `time` LIMIT 1");
    
$first    =    mysql_fetch_array($sql);

    
// add this hit
    
$sql    =    mysql_query("INSERT INTO `hits` (`IP`, `time`) VALUES ('".$_SERVER['REMOTE_ADDR']."', '".time()."')");

    
// display text
    
echo "There has been ".number_format($views)." page views since ".date("F j, Y"$first['time'])."<br>";
    echo 
number_format($unique)." of those were unique hits.<br>";

?>
IM me if you need more help (MikeWasHere05)

sounds like what I want to do. I guess I'll download and install Mysql tomorrow. I just got on to check for any other ideas. Still havent gotten it to work, but didnt have much chance.
Closed Thread


Thread Tools
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Auton's Joe Clohessy Programming 17 11-02-2005 18:46
Offloading intterupts to a counter Max Lobovsky Control System 14 30-03-2004 21:07
Re: we have a webpage archiver 2000 0 23-06-2002 23:13
RAMBOTS, brand new webpage. archiver 2000 0 23-06-2002 23:06
new webpage Greg Needel Chit-Chat 3 24-02-2002 21:28


All times are GMT -5. The time now is 00:27.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi