Page 3 of 6
Posted: Sat Nov 30, 2002 3:28 pm
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]
Posted: Sun Dec 01, 2002 7:50 am
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...
Posted: Mon Dec 02, 2002 2:56 am
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
Posted: Mon Dec 02, 2002 8:11 am
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...
Posted: Mon Dec 02, 2002 9:34 pm
by beyonder
meh...i could config the php to run in the same directory if i wanted to cause problems.....
Posted: Tue Dec 03, 2002 7:23 am
by Pez-Man
Maaaaaaaaaaaan, I have NO idea what they're talking about.
Posted: Wed Dec 04, 2002 7:36 am
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.
Posted: Thu Dec 05, 2002 7:40 am
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?
Posted: Mon Dec 09, 2002 7:21 am
by Twilkitri
Comics 47-50 are now up.
And no, I'm not having a 50th comic party.
Posted: Tue Dec 10, 2002 6:46 am
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
Posted: Wed Dec 11, 2002 7:55 am
by Twilkitri
No. 52 is up.
Can you guess who it is yet?
Posted: Fri Dec 13, 2002 7:16 am
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.
Posted: Tue Dec 24, 2002 7:17 am
by Twilkitri
Um... oops. I've been forgetting to post my updates :/
60 is the newest one.
Posted: Thu Jan 02, 2003 7:15 am
by Twilkitri
#61 is up. Yay for me.
Posted: Fri Jan 03, 2003 8:23 am
by Twilkitri
#62 is up. Yay for me.
<I'm going to continue this until someone comments>