STS - The Comic

Are you a fan? Have a comic? This is the place to post your comic and get ...constructive....critcism.
User avatar
beyonder
Webmaster
Webmaster
Posts: 672
Joined: Mon May 20, 2002 7:53 pm
Location: my house.
Contact:

Post by beyonder »

in order to edit the file on the server you need to run a servlet b/c normal users simply wont have right access to the driectory in question.....in order to run a servlet the server needs to kno what to do with class files, or at the very least have j2re installed...if normal clients had the access necessary to open a file on the server, write to said file on server, and then proceed to close said file on server i wouldnt have much control over what was on my site, now would i? you can HTTP POST the variable up to the server but you need a servlet or other script in order to tell the server what to do w/ the variable...if you could have the counter query a mySQL database i could set up an account on the db server that you could use for that which is much simpler than setting up the server to run servlets...and using a client side script to write to server side files simply isnt efficient in the first place...

Code: Select all

<?php
$counter_file = "icancount.dat";
if(!($fp = fopen($counter_file , "r"))) die ("file no go open.  hah.");
$counter = (int)fread($fp, 24);
fclose($fp);
$counter++;
$fp = fopen($counter_file , "w");
fwrite($fp, $counter);
fclose($fp);
?>
<?php
for ($i = 0 ;$i < strlen($counter) ; $i++)
{
$imgsrc = SubStr($counter,$i ,1);
echo "<img src =\"images/" . $imgsrc . ".GIF\" width=\"30\" height=\"40\">";
}
?>
this server passes htm, html and php documents thro the php processor so if u put that code in an html file and have the file "icancount.dat" in the same directory it will embed pictures 0-9 from the images/ directory....it can do the counting b/c PHP is a server side script...btw this is the code for the counter in use on the main page.[/code]
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

So I could basically just copy that into a page, make minor adjustments (ie: change icancount.dat to a different filename) and it would work? Or not?
Databases and stuff in that vein, I haven't done yet. So the stuff you were saying about mySQL et al went right over my head...
User avatar
beyonder
Webmaster
Webmaster
Posts: 672
Joined: Mon May 20, 2002 7:53 pm
Location: my house.
Contact:

Post by beyonder »

you dont need to change icancount.dat since the working directory for your scripts is different from the working directory for the scipts on the main page....all u have to do is make the file icancount.dat in the same directory with the page this will be used on....icancount.dat simply stores a number...you also need an images directory w/ 1.gif,2.gif,etc. in it...to make the file just make a blank text document and save it, then upload it via ftp
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

>< I'm not _that_ uninformed, beyonder. I didn't mean change the name to differentiate it from the one on the main page...
User avatar
beyonder
Webmaster
Webmaster
Posts: 672
Joined: Mon May 20, 2002 7:53 pm
Location: my house.
Contact:

Post by beyonder »

meh...i could config the php to run in the same directory if i wanted to cause problems.....
Pez-Man
Pez-Man
Posts: 3427
Joined: Sat May 18, 2002 6:54 pm
Contact:

Post by Pez-Man »

Maaaaaaaaaaaan, I have NO idea what they're talking about.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

Got a new comic mostly done, just gotta put the words in.
I normally try to get them finished in one sitting, but I got interupted and haven't had a chance to finish it. I should put it up tomorrow.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

So~
I got the comic done, it's up, got another one done too.
So 45 & 46 are now up. Amazing I actually got 2 done in two days...
Care to guess who's going to be next?
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

Comics 47-50 are now up.
And no, I'm not having a 50th comic party.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

51 is up.
'Nostalgia' page is also up, I haven't got a link on any pages to it yet, so you'll have to go to http://content.thegreatbeyond.net:8080/ ... talgia.htm
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

No. 52 is up.
Can you guess who it is yet?
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

<.<
>.>
I applaud the guessing skills of the board.
No.s 53 and 54 are up.
And I've started work on a Java comic-viewer-thingy...
And, NO, beyonder, it doesn't need to write anything to here. It does need to read stuff from here, but I'm pretty sure I've got it figured out how to do that.

You'll probably have to download the Java2 plugin to use it, though. I could use AWT instead of Swing so you don't have to, but... meh. I like Swing better.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

Um... oops. I've been forgetting to post my updates :/
60 is the newest one.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

#61 is up. Yay for me.
User avatar
Twilkitri
Pez-Ruler
Pez-Ruler
Posts: 1484
Joined: Sun May 19, 2002 10:20 pm
Location: Australia

Post by Twilkitri »

#62 is up. Yay for me.

<I'm going to continue this until someone comments>
Post Reply