...

View Full Version : Poll and Counter script/code.



DawgieDog
12-24-2002, 06:43 PM
I'm not sure in what forums this goes but I am looking for a counter script/code where I can edit the color of the numbers and maybe the BG of the counter. I'm also looking for a script for a poll where I can edit everything in the poll; the button, the color of text and the BG of the poll. Can anyone help me? Please....

ez4me2c3d
12-24-2002, 07:24 PM
does your web server have PHP installed? if so, i have a script that i wrote for a page counter that counts page hits but not refreshes. it uses images to display the numbers so it is 100% customizable.

DawgieDog
12-24-2002, 08:32 PM
Yup, my server supports everything, PHP, mySQL, etc. You could e-mail me the code to jsfd26@yahoo.com or just post it here.

ez4me2c3d
12-24-2002, 10:16 PM
<?php
if (!$hit) {
if (file_exists("file.ext")) {

$file = fopen("file.ext","r");

if ($number = fgets($file,1024)) {

$number = trim($number);

}

fclose($file);
$file = fopen("main.txt","w");

fwrite($file,$number + 1);

fclose($file);
echo '<meta http-equiv=Refresh content="0; url=' . $PHP_SELF . '?hit=1">';
}
}
?>

<html>

<head>


<title>Counter</title>


</head>


<body>


<?php
if (file_exists("file.ext")) {

$file = fopen("file.ext","r");

if ($number = fgets($file,1024)) {

$number = trim($number);

}

fclose($file);
}

//pads the number with zeros
$xtra = 6 - strlen($number);
for ($i = 0; $i < $xtra; $i++) {
echo '<img src="images/counter/0.gif" />';
}

//displays the rest of the numbers
for ($i = 0; $i < strlen($number); $i++) {
echo '<img src="images/counter/' . $number{$i} . '.gif" />';
}
?>


</body>


</html>

ez4me2c3d
12-24-2002, 10:45 PM
now you only need to make images for each number..0-9 and you're done.

joeframbach
12-24-2002, 10:50 PM
lol im soo immature...
if (!$hit)

ez4me2c3d
12-25-2002, 07:34 AM
lol yeah i actually learned QBASIC first and for all of us old programmers we know that the dollar sign came at the end of the variable for string variables only, like variable$. so we knew that variable was a string and not an integer.

anyway, we use to joke about g$.

krycek
12-25-2002, 12:55 PM
Originally posted by ez4me2c3d
lol yeah i actually learned QBASIC first and for all of us old programmers we know that the dollar sign came at the end of the variable for string variables only, like variable$. so we knew that variable was a string and not an integer.

anyway, we use to joke about g$.

heheh yeah :D QBASIC... man that brings back memories :)

I remember programming a 3D rotating wireframe cube on my Amstrad 1640 many, many years ago. And I still can't do stuff like that in a web browser without using SVG, lol :)

Merry Christmas Everyone!

::] krycek [::

Mhtml
12-25-2002, 02:39 PM
Good ole Qbasic... I remeber that, I made so much stuff on my commodore 286. ( I always wanted a 486 )

I remember my first good proggy was a bouncing ball.

Also what do ya mean old? I'm only 15! I did BASIC in 1993 when I was 6 years old.

ez4me2c3d
12-25-2002, 05:44 PM
holy ****.. 6? i didnt touch a computer until my junior year in high school and im 20 now. damn. you all must have been the rich kids with the new stuff before anyone else had it huh? speaking of which, what'd you get today?

Mhtml
12-25-2002, 05:49 PM
lol...rich well I wouldn't say that. we were running win 3.1 when 95 came out and 95 when 98 and millenium came out. Right now I'm running a pII 200mmx with a 1mb graphics card and only 64mb ram. lol :)

As for today I got a new watch and some webspace with domain.
And a whole bunch of other thingies from relatives. Oh yeah and a new mobile.

DawgieDog
12-26-2002, 06:49 AM
Well, what I'm making is a HTML page. How will I put that code in the Poll section? Here is the link to the site, the poll section is in the right.
http://www.emc.idz.net



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum