Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-24-2002, 05:43 PM   PM User | #1
DawgieDog
New Coder

 
Join Date: Oct 2002
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
DawgieDog is an unknown quantity at this point
Lightbulb Poll and Counter script/code.

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....
DawgieDog is offline   Reply With Quote
Old 12-24-2002, 06:24 PM   PM User | #2
ez4me2c3d
Regular Coder

 
Join Date: Dec 2002
Location: Minneapolis, MN
Posts: 208
Thanks: 0
Thanked 1 Time in 1 Post
ez4me2c3d is an unknown quantity at this point
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.
__________________
anthony
ez4me2c3d is offline   Reply With Quote
Old 12-24-2002, 07:32 PM   PM User | #3
DawgieDog
New Coder

 
Join Date: Oct 2002
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
DawgieDog is an unknown quantity at this point
Yup, my server supports everything, PHP, mySQL, etc. You could e-mail me the code to jsfd26@yahoo.com or just post it here.
DawgieDog is offline   Reply With Quote
Old 12-24-2002, 09:16 PM   PM User | #4
ez4me2c3d
Regular Coder

 
Join Date: Dec 2002
Location: Minneapolis, MN
Posts: 208
Thanks: 0
Thanked 1 Time in 1 Post
ez4me2c3d is an unknown quantity at this point
PHP Code:
<?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 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>
__________________
anthony
ez4me2c3d is offline   Reply With Quote
Old 12-24-2002, 09:45 PM   PM User | #5
ez4me2c3d
Regular Coder

 
Join Date: Dec 2002
Location: Minneapolis, MN
Posts: 208
Thanks: 0
Thanked 1 Time in 1 Post
ez4me2c3d is an unknown quantity at this point
now you only need to make images for each number..0-9 and you're done.
__________________
anthony
ez4me2c3d is offline   Reply With Quote
Old 12-24-2002, 09:50 PM   PM User | #6
joeframbach
Regular Coder

 
Join Date: Dec 2002
Location: a bit west of pittsburgh
Posts: 236
Thanks: 1
Thanked 0 Times in 0 Posts
joeframbach is an unknown quantity at this point
lol im soo immature...
Quote:
if (!$hit)
joeframbach is offline   Reply With Quote
Old 12-25-2002, 06:34 AM   PM User | #7
ez4me2c3d
Regular Coder

 
Join Date: Dec 2002
Location: Minneapolis, MN
Posts: 208
Thanks: 0
Thanked 1 Time in 1 Post
ez4me2c3d is an unknown quantity at this point
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$.
__________________
anthony
ez4me2c3d is offline   Reply With Quote
Old 12-25-2002, 11:55 AM   PM User | #8
krycek
Regular Coder

 
Join Date: Nov 2002
Location: Bristol, UK
Posts: 932
Thanks: 0
Thanked 0 Times in 0 Posts
krycek is an unknown quantity at this point
Quote:
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 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 [::
__________________
ithium | SOAPI | SDP | PTPScript manual
"ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."
krycek is offline   Reply With Quote
Old 12-25-2002, 01:39 PM   PM User | #9
Mhtml
Senior Coder

 
Mhtml's Avatar
 
Join Date: Jun 2002
Location: Sydney, Australia
Posts: 3,531
Thanks: 0
Thanked 1 Time in 1 Post
Mhtml is an unknown quantity at this point
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.
__________________
Omnis mico antequam dominus Spookster!

Last edited by Mhtml; 12-25-2002 at 01:42 PM..
Mhtml is offline   Reply With Quote
Old 12-25-2002, 04:44 PM   PM User | #10
ez4me2c3d
Regular Coder

 
Join Date: Dec 2002
Location: Minneapolis, MN
Posts: 208
Thanks: 0
Thanked 1 Time in 1 Post
ez4me2c3d is an unknown quantity at this point
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?
__________________
anthony
ez4me2c3d is offline   Reply With Quote
Old 12-25-2002, 04:49 PM   PM User | #11
Mhtml
Senior Coder

 
Mhtml's Avatar
 
Join Date: Jun 2002
Location: Sydney, Australia
Posts: 3,531
Thanks: 0
Thanked 1 Time in 1 Post
Mhtml is an unknown quantity at this point
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.
__________________
Omnis mico antequam dominus Spookster!
Mhtml is offline   Reply With Quote
Old 12-26-2002, 05:49 AM   PM User | #12
DawgieDog
New Coder

 
Join Date: Oct 2002
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
DawgieDog is an unknown quantity at this point
Unhappy

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
DawgieDog is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:53 PM.


Advertisement
Log in to turn off these ads.