Page 2 of 3

Posted: Jul 23rd 2003, 10:08 am
by fnordboy
Now just remember guys, I am not the one making the SciFi movie and such references :D

Posted: Jul 23rd 2003, 12:01 pm
by starbug
but you acknowledge your status as the unreserved geek king of the forum, right? :wink:

'ahhhh, but it hasn't happen happened, has it? I mean it could will have been going to have happened, but it hasn't actually happen happened, has it?'

Posted: Jul 23rd 2003, 12:05 pm
by fnordboy
starbug wrote:but you acknowledge your status as the unreserved geek king of the forum, right? :wink:
Actually no, I am just a mere runner up according to this thread

Me: 42.40631% - Major Geek

MGlenn: 68.44181% - Geek God

:D :D

Posted: Jul 23rd 2003, 12:07 pm
by starbug
Damn it. I forgot about actually checking that thread - but yeah, I'd forgotten about Mglenn and his amazing capacity for all things tiny-and-communication-based.

Sorry Mglenn... :D

Posted: Jul 23rd 2003, 1:19 pm
by Natasha (candygirl)
sab wrote:
Nostradamus wrote: Well, that clears it up! Candygirl was right, you need the LMNOP.
Hm, I don't see how the "Lake Merritt Neighbors Organized for Peace" could be of any help here. :wink:
Hey, KMA!

:x

:mrgreen:

Posted: Jul 23rd 2003, 1:23 pm
by Natasha (candygirl)
Nothingman wrote:Perhaps you just need more fuel for the flux capacitor, or maybe your matter, anitimatter injectors aren't calibrated correctly.

(I know, I'm not helping :P )
Marty McFly: So does it run on regular unleaded gasoline?
Dr. Emmett Brown: Unfortunately no, it needs something with a little more kick - plutonium.
Marty McFly: Plutonium... wait, are you telling me that this sucker is nuclear?!
Dr. Emmett Brown: No no no, this sucker's electrical, but it requires a nuclear reaction to generate the 1.21 gigawatts of electricity I need.
Marty McFly: Doc, you don't just walk into a store and buy plutonium... did you rip that off??
Dr. Emmett Brown: Shhhhhh!! Of course. From a group of Libyan nationalists. They wanted me to build them a bomb, so I took their plutonium and in turn, gave them a shiny bomb-casing filled with used pinball machine parts!
(later, or earlier depending on how you look at it)
Dr. Emmett Brown: I'm sure in 1985, plutonium is available at every corner drugstore, but in 1955 it's a little hard to come by!

Posted: Jul 23rd 2003, 1:30 pm
by Nothingman
candygirl wrote:Marty McFly: So does it run on regular unleaded gasoline?
Dr. Emmett Brown: Unfortunately no, it needs something with a little more kick - plutonium.
Marty McFly: Plutonium... wait, are you telling me that this sucker is nuclear?!
Dr. Emmett Brown: No no no, this sucker's electrical, but it requires a nuclear reaction to generate the 1.21 gigawatts of electricity I need.
Marty McFly: Doc, you don't just walk into a store and buy plutonium... did you rip that off??
Dr. Emmett Brown: Shhhhhh!! Of course. From a group of Libyan nationalists. They wanted me to build them a bomb, so I took their plutonium and in turn, gave them a shiny bomb-casing filled with used pinball machine parts!
(later, or earlier depending on how you look at it)
Dr. Emmett Brown: I'm sure in 1985, plutonium is available at every corner drugstore, but in 1955 it's a little hard to come by!
Thanks for the BTTF quotes. That made my day. I have to go listen to Huey Lewis - "Power of Love" now. :D

Posted: Jul 23rd 2003, 1:57 pm
by mglenn
starbug wrote:Damn it. I forgot about actually checking that thread - but yeah, I'd forgotten about Mglenn and his amazing capacity for all things tiny-and-communication-based.

Sorry Mglenn... :D
No harm! I've already written my Content Management System(CMS) in Java, using XML, JDOM, JDBC and Velocity Template Engine. I'm currently writting the management tools using Swing and AWT. Then theres my mp3 player in my car, cause how many people can say the can compile a linux kernel while they are driving. And which I'm currently trying to get voice recognition to work with (road noise is a bitch, and I don't have enough processor to do realtime phase shift cancelation!) And ofcourse who can forget about AZN, which was my custom cable modem management software I wrote back in 98-99, and then didn't patent...(I'd be rich now damnit!) and the JAS server that lets techtools (I didn't write techtools) connect and get data from our AS400 mainframe....and... gawd I'm a geek!!! :robot:

"Any normal person would have stopped at this point, but for better or worse I'm not a normal person! I'm a geek! A geek beyond reason!"

Posted: Jul 23rd 2003, 2:05 pm
by Nothingman
Ok everyone, we are going to smile and nod on three as if we understood what mglenn just said.

:admire: :turn-l:

Posted: Jul 23rd 2003, 9:42 pm
by GaryEA
:huh:

Posted: Jul 23rd 2003, 9:55 pm
by Natasha (candygirl)
Yeah, because all I heard was blah blah blah, blah blah blah.

Words.

:D

now for something completely different...

Posted: Jul 24th 2003, 1:25 am
by fnordboy
Sascha (or anyone else who can answer me),

Ok, I actually didn't end up going with your code :oops: , but I might. I wanted to get your opinion on something first. I started searching around through some tutorials for a secure include script. I found one that made sense to me and went with it. Then I kinda decided to kill two birds with one stone and take the existing $page variable and drop it into my title tag, you will see in the code below:

This is what I am including on the wallpapers.php page:

Code: Select all

<?php require_once( "safewallpapers.php");?>

<?php
$include = $_GET['page'];
if ( in_array( $page, $acceptable_pages ) )
{
require_once( "wallpapers/$page.html" );
}
else
{
require_once( "wallpapers/error.html" );
}
?>
The content of safewallpapers.php is this:

Code: Select all

<?php
$acceptable_pages = array(
'Menu',
'Ah My Goddess',
'Ai Yori Aoshi',
'Akihabara Dennou Gumi',
'Azumanga Daioh',
'Bakuretsu Hunters',
'Blood',
'Boogiepop Phantom',
'Cardcaptor Sakura',
'Chobits',
'Comic Party',
'Cowboy Bebop',
'Devil Hunter Yohko',
'Di Gi Charat',
'dot hack',
'El Hazard',
'Escaflowne'
);
?>
Those are the names of the shows that have wallpapers (there will be more, that is just all I added to the list so far). Now in the < title > I did this:

Code: Select all

<title>animeGlitch > Wallpapers > <?php echo "$page"; ?></title>
I figured by linking to wallpapers.php?page=Ah%20My%20Goddess I can load the content securely AND fill in the title tag.

Now, three questions, do you think the above code is kosher? It all seems to work fine for me so far. Do you think it will be too much of a load on the server to have to process the safewallpapers.php page each time the page is loading, especially when the list is double or triple its size right now? And, finally, will I run into a problem with using the spaces between the names of the html includes and is it search friendly?

Sorry to bombard you but I am just a bit confused at this point lol :oops:

Maybe it would be easier to just keep the pages named as shortend versions: "puni.html" instead of "Puni Puni Poemi.html" and figure out an easier way to define the title tag.... maybe an If/Then type deal (if $page='puni' then $title='Puni Puni Poemi') and then echo $title in the title tag?

Thanks in advance. I know this isn't as interesting as dating advice threads but bear with me ;) :lol:

Oh yeah you can see it working at: http://www.animeglitch.com/wallpapers.p ... %20Goddess

or

http://www.animeglitch.com/wallpapers.php?page=Menu (menu links do not work)

Re: now for something completely different...

Posted: Jul 24th 2003, 5:06 am
by Sascha
Okay, if you're willing to list all allowed pages in your code, then this is a good way to go. But don't use spaces in filenames on a linux machine (or on any webserver). Some browsers don't understand it. I modified your code a little bit:

Code: Select all

<?php require_once( "safewallpapers.php");

$include = $_GET['page'];
if (array_key_exists($include, $acceptable_pages))
{
require_once( "wallpapers/$include.html" );
}
else
{
require_once( "wallpapers/error.html" );
}
?>
The content of safewallpapers.php is this:

Code: Select all

<?php
$acceptable_pages = array(
   'menu' => 'Menu',
   'ahmygoddess' => 'Ah My Goddess',
   'aiyoriaoshi' => 'Ai Yori Aoshi',
   [and so on]
); 

?>

<title>animeGlitch > Wallpapers > <?php echo $acceptable_pages[$include]; ?></title>
You can now link to wallpapers.php?page=ahmygoddess
Now, three questions, do you think the above code is kosher?
Yes, this is perfectly safe.
Do you think it will be too much of a load on the server to have to process the safewallpapers.php page each time the page is loading, especially when the list is double or triple its size right now?
Absolutely no problem if you're not running a webserver on a 1990'ish 486-PC. This array could hold tenthousands of entries and you would only note a tiny delay (we're talking microseconds here).
And, finally, will I run into a problem with using the spaces between the names of the html includes and is it search friendly?
As mentioned above, yes you'd run into problems. But the new code should work even for searchengines. (at least google crawls the first variable in an url)

Posted: Jul 24th 2003, 8:17 am
by mglenn
Just thought I should post this considering where this is going:

http://www.pclinuxonline.com/modules.ph ... e&sid=7258

:D

Posted: Jul 24th 2003, 11:29 am
by Sascha
mglenn wrote:Just thought I should post this considering where this is going:

http://www.pclinuxonline.com/modules.ph ... e&sid=7258

:D
Yeah, PHP is really good stuff and pretty cheap and easy to get here in Europe. I used ASP before, but you had to pay lots of $$$ to experience something at all (and I didn't like their main dealer, "Big Bill"). All my complicated C sh!t became clear after one puff of PHP. Some of my friends are now using XML-RPC and XSL in addition to PHP and feel pretty good (the secret scene code name is "SOAP"). But I tend more to pure PHP-OO recently, with some CSS, RSS and even SSL when I'm up for it. And I heard that the scene is really excited about a new import from Asia, called "rubY", but I haven't tried that myself yet.