Esato Mobile
General discussions : Non mobile discussion : counter on website question - IIS question added
> New Topic
> Reply
< Esato Forum Index > General discussions > Non mobile discussion > counter on website question - IIS question added Bookmark topic
Page <  1234>

EastCoastStar Posts: > 500

still nothing nothing loads on the page, its like i never put the code there, but its in the HTML
--
Posted: 2005-11-02 21:54:25
Edit : Quote

Johnex Posts: > 500

Whats the address? Pm it to me. This message was posted from a Z1010
--
Posted: 2005-11-03 06:07:09
Edit : Quote

EastCoastStar Posts: > 500

you got PM
--
Posted: 2005-11-03 06:26:48
Edit : Quote

Johnex Posts: > 500

So do you :-).:-):-) This message was posted from a Z1010
--
Posted: 2005-11-03 06:57:01
Edit : Quote

EastCoastStar Posts: > 500

and back at yaaaaa
--
Posted: 2005-11-03 14:45:12
Edit : Quote

Johnex Posts: > 500

.....and yet again.
--
Posted: 2005-11-03 15:23:43
Edit : Quote

EastCoastStar Posts: > 500

and back again... maybe haha idk if u saw it yet lol
--
Posted: 2005-11-03 15:37:19
Edit : Quote

Johnex Posts: > 500


--
Posted: 2005-11-03 16:02:51
Edit : Quote

Johnex Posts: > 500

// PHP Counter © Johnex 2005
//=============================

//=======================//
// File: counter.php //
//=======================//
// Paste the following into
// a new file in notepad,
// save with "File Name"
// counter.php , and "Save
// As Type" as "All Files".
// Change the variables
// below to match your
// mysql settings.
//=========================

<?
// PHP Counter v2.0 © Johnex 2005
//=============================

// Make File, Read Count, Add 1, Write New Count
if(file_exists('count_file.txt')) {
$count_file = fopen('count_file.txt', r);
$count = fread($count_file, filesize('count_file.txt'));
$new_count = $count+1;
fclose($count_file);
$count_file = fopen('count_file.txt', w);
fwrite($count_file,$new_count);
fclose($count_file);
} else {
$count_file = fopen('count_file.txt', w);
fwrite($count_file, 1);
$new_count = '1';
fclose($count_file);
}

// Print
print'
<!--
function writeCounter() {
'."document.getElementById('counter').innerHTML = '<b>Hits: $new_count</b>';".'
}
//-->
';

?>

//=======================//
// HTML //
//=======================//
// Folow this "template", in the head
// tags of the source of the site write
// the script stuff, then, in the opening
// body tag, write the onload stuff.
// Lastly, paste the div stuff where
// you want the counter to be
// displayed. Change the
// "src" to the folder where
// the counter.php file is located
//===========================

<html>
<head>
<script type="text/javascript" src="counter.php"></script>
</head>
<body onload="writeCounter()">
<div id="counter"></div>
</body>
</html>

//=============================

Flat File Version v2.0

New changes to make it work, test it here: http://johnex.se/dev/counter/
--
Posted: 2005-11-03 16:27:19
Edit : Quote

EastCoastStar Posts: > 500

almost got it... but... it wont increment for some odd reason?!? idk whats going on with it haha.
i want to try something, and see if it will work...

edit: hrm... still wont increment... i still get the 1 so i know it knows its there, but why it wont increment is beyond me...

[ This Message was edited by: EastCoastStar on 2005-11-03 18:21 ]
--
Posted: 2005-11-03 19:18:49
Edit : Quote
Page <  1234>

New Topic   Reply
Forum Index

Esato home