Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 06-09-2005, 11:30 PM Web Counter
Average Talker

Posts: 18
Trades: 0
Ive tried 2 web counters so far. They both reset after about an hour. Does anyone know why this would happen?

If anyone knows of a good free web counter that I could get, please help me out by telling me.

Thanks.
clickz2cash is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-10-2005, 02:15 AM
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
Are you talking about external web counter that is applied to your site by placing a 88x31 button or the one that parses your server logs?
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 06-10-2005, 10:43 AM
Average Talker

Posts: 18
Trades: 0
I used one that linked to a different website for the image and script and stuff and I also used a simple text one that I put the code into the index file.
clickz2cash is offline
Reply With Quote
View Public Profile
 
Old 06-10-2005, 01:48 PM
Experienced Talker

Posts: 32
Trades: 0
I found this really good php counter http://www.tizag.com/tools/counter.php that really works. And if you dont like the images that they have avaiable you can make your own or do like what i did delete all the images and modify counter.php to make it just return the couter number instead of images.
rcubes85 is offline
Reply With Quote
View Public Profile
 
Old 06-11-2005, 02:44 AM
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
http://www.relmaxtop.com/
http://warlog.info/

Or just install AwStats on your server
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!

Last edited by mtishetsky; 06-11-2005 at 02:47 AM..
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 06-11-2005, 12:26 PM
Average Talker

Posts: 18
Trades: 0
I tried what rcubes85 said...it was working good..but then all of a sudden it turns into error boxes or something. Go to www.clickz2cash.com and go to the bottom of the page. That's what happens..

I have awstats on my server..Is there a way to display how many hits we get from that?

Last edited by clickz2cash; 06-11-2005 at 12:32 PM..
clickz2cash is offline
Reply With Quote
View Public Profile
 
Old 06-11-2005, 08:50 PM
Experienced Talker

Posts: 32
Trades: 0
the folder contains some images you have to copy those images to your image folder. i check your image folder on your site and i notice that the folders are not there
rcubes85 is offline
Reply With Quote
View Public Profile
 
Old 06-12-2005, 09:28 AM
Average Talker

Posts: 18
Trades: 0
Okay, it started out as one folder name, then changed to another folder name. So I thought maybe it needs to change to 2 folders, and the script just forgot to put both folders in. So I made 2 folders and it worked for a while, and now its changing folders again. Its looking for a folder called 82, and that never came with the script, just like 94 never came with the script.

Does it still count even though the images are broken?

Now the script is looking for it in a folder called 4..

Last edited by clickz2cash; 06-12-2005 at 12:54 PM..
clickz2cash is offline
Reply With Quote
View Public Profile
 
Old 06-13-2005, 12:01 PM
Average Talker

Posts: 18
Trades: 0
Can someone help with the problem Im having?
clickz2cash is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 01:37 AM
Experienced Talker

Posts: 32
Trades: 0
ok here is the modification that i made to the code to make it just return the number and not the image because the image that it return were too big for my website

PHP Code:
<?php 
        
// Open the counter file
    
    
$file "stats";
    if(!(
$fp fopen($file "r"))) 
        die (
"Could not open the requested file!  You may need to CHMOD 777 it!");
    
$count trim(fgets($fp));
    
$selection trim(fgets($fp));
    
    
fclose($fp);
    
    
$count++;
    
    
$fp fopen($file "w");
    
    
fwrite($fp$count);
    
fwrite($fp"\n");
    
fwrite($fp$selection);
    
    
fclose($fp);
    
$count_image "<img src='images/".$selection."/";
    echo 
"<strong><font size=2 color = yellow >" $count "</font></strong>";

?>
rcubes85 is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 02:33 AM
Average Talker

Posts: 18
Trades: 0
Awesome!! Thanks so much for your help...it's working awesome right now..Ill post something if something goes wrong.

Thanks!
clickz2cash is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 10:32 AM
Average Talker

Posts: 18
Trades: 0
It reset. I dont know why it resets. Is your script supposed to reset? I dont want mine to reset.
clickz2cash is offline
Reply With Quote
View Public Profile
 
Old 06-14-2005, 10:52 AM
Uche's Avatar
Extreme Talker

Posts: 174
Location: Nigeria/Lagos
Trades: 0
Hi can you use this ??
PHP Code:
<?php
//this is our text file if you create a different 
//named file change the script below to reflect this
$counter_file = ("mycount.txt");
//now we open the file
$visits file($counter_file);
//this increments the counter value by 1
$visits[0]++;
//now we will open the counter file for
//writing "w"
$fp fopen($counter_file "w");
//put the new count value into the counter
//file
fputs($fp "$visits[0]");
//close the file
fclose($fp);
//display the count
echo $visits[0];
?>

And to add this to your page you enter the following where you wish the counter to appear , again if you have called your file with the script in it something other than mycounter.php , you will have to change the script to reflect this.

<?php
include ("mycounter.php");
?>
__________________
Life is just lyke a school where everybody goes to learn one or two thing. the more u school, the more u learn more about school..The more we live our lifes.. the more we learn more about life.

Please login or register to view this content. Registration is FREE
Uche is offline
Reply With Quote
View Public Profile Visit Uche's homepage!
 
Old 06-14-2005, 09:53 PM
Experienced Talker

Posts: 32
Trades: 0
yea you can use that too also if you are running a .com and you hve cpanel go to cgi scripts and one of the scripts in there shoudl be counter that runs off your .com
rcubes85 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Web Counter
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.42773 seconds with 12 queries