Shreveport.com

Shreveport.com (http://www.shreveport.com/forums/index.php)
-   SBLive! Polls (http://www.shreveport.com/forums/forumdisplay.php?f=58)
-   -   What is your favorite form of online entertainment? (http://www.shreveport.com/forums/showthread.php?t=1319)

sbl_admin 05-02-2007 02:22 PM

What is your favorite form of online entertainment?
 
How do you spend your free time on the Internet? If you choose "Other," please tell us what you do online.

joepole 05-02-2007 02:23 PM

Pornography and the luring of minors across state lines for the purpose of sexual intercourse.

AnimeSpirit 05-02-2007 02:28 PM

I chose "other" because I also like writing PHP scripts on my spare time. It may sound a little nerdy, but I find it fun.

rhertz 05-02-2007 03:02 PM

Quote:

Originally Posted by joepole
Pornography and the luring of minors across state lines for the purpose of sexual intercourse.

I enjoy your humor, but IMHO you might want to wrap that in [sarcasm] [/sarcasm] tags just to be safe. I know you are joking, but somone else may not.

sassy1 05-02-2007 04:27 PM

Definitely shopping. The convenience of not having to leave the home coupled with not having to interact with people if I choose not to...guess that sounds a bit antisocial - but true.

BrainSmashR 05-02-2007 04:38 PM

I'm with Anime on this one. The majority of my online time is spent tweaking various aspects of my website

AnimeSpirit 05-02-2007 05:00 PM

Yeah? What's your most complex script, Mr. Iframes? ;) I'd like to see some of your code.

BrainSmashR 05-02-2007 05:17 PM

Define complex.

Is pulling live data from my database and displaying it in a gif signature image that refreshes every time you refresh the page what you would consider complex? I notice you don't have one.....

How about adding code to an existing script that pulls wapdata from BOINC servers and displays THAT data in a graphical image?
http://www.brainsmashr.com/boinc.gif

Now I'm not a master coder or even a professional by any stretch of the imagination, but don't let the fact that I use iframes fool you into thinking I don't have nearly a decade of experience running my own website, Anime....

AnimeSpirit 05-02-2007 05:28 PM

Quote:

Originally Posted by BrainSmashR
Is pulling live data from my database and displaying it in a gif signature image that refreshes every time you refresh the page what you would consider complex? I notice you don't have one.....

Don't let the fact that I use iframes fool you into thinking I don't have nearly a decade of experience running my own website, Anime....

Actually, displaying dynamic data in a GIF is very simple. I don't use one on my site for 2 reasons: 1. None of my sites have data that change so drastically throughout the day; 2. Everytime someone views a page that has such a banner on it, it must query your database for the info in order to make it, which puts a huge strain on the server when you've got that banner displayed in 100+ places and people are hitting those pages 500+ times a day.

Don't get me wrong, dynamic banners a great idea, but it's better for your server's peformance to set a script that creates this image and updates it at specific times of the day instead of everytime the banner is loaded. Set a CRON job to run your banner update script once a day and that would probably be efficient enough and won't eat your server resources alive.

Here's a simple script I wrote a while back to write a text string to an existing graphic file.
PHP Code:

$string "Some text";
$NewImage =imagecreatefromjpeg("pic.jpg");
$TextColor imagecolorallocate($NewImage255255255);
imagestring($NewImage5205$string$TextColor);
imagejpeg($NewImage); //Output image to browser or save to path 

It would be very simple to point this at an existing background image and query for some data to place in it.

If you want, let's jump to the computer forums and continue this. We can share code if you want. I've got some tricks you might like.

sassy1 05-02-2007 05:42 PM

you two are truly geeks. :)

BrainSmashR 05-02-2007 05:59 PM

Quote:

Originally Posted by AnimeSpirit
Actually, displaying dynamic data in a GIF is very simple. I don't use one on my site for 2 reasons: 1. None of my sites have data that change so drastically throughout the day; 2. Everytime someone views a page that has such a banner on it, it must query your database for the info in order to make it, which puts a huge strain on the server when you've got that banner displayed in 100+ places and people are hitting those pages 500+ times a day.

Don't get me wrong, dynamic banners a great idea, but it's better for your server's peformance to set a script that creates this image and updates it at specific times of the day instead of everytime the banner is loaded. Set a CRON job to run your banner update script once a day and that would probably be efficient enough and won't eat your server resources alive.

Here's a simple script I wrote a while back to write a text string to an existing graphic file.
PHP Code:

$string "Some text";
$NewImage =imagecreatefromjpeg("pic.jpg");
$TextColor imagecolorallocate($NewImage255255255);
imagestring($NewImage5205$string$TextColor);
imagejpeg($NewImage); //Output image to browser or save to path 

It would be very simple to point this at an existing background image and query for some data to place in it.

If you want, let's jump to the computer forums and continue this. We can share code if you want. I've got some tricks you might like.


Yes, I agree that's better for server performance, but I prefer current information, not something that is 24 (or more) hours old.

Note the differences in these two BOINC sigs.
http://www.brainsmashr.com/boinc.gif
http://boinc.mundayweb.com/one/stats.php?userID=9036


Well I can't display a dynamic image without utilizing a rewrite in my htaccess file and I'm not gonna do that to show something you already know about, espically when it's data from another site, but my current Eienstein@Home credit is more than 200 points higher than the signature utilizing the method you described is showing.....and that's just 1 project.

purpahurl 05-02-2007 06:45 PM

humor
 
Quote:

Originally Posted by joepole
Pornography and the luring of minors across state lines for the purpose of sexual intercourse.

That's hilarious, you're not Mike Sieve are you?

joepole 05-03-2007 09:44 AM

Not anymore. Now I go by "Miguel Sanchez."

Al Swearengen 05-03-2007 09:11 PM

I love a good Mike Sieve joke...and Greg Frazier jokes too.

piemaker720 05-03-2007 09:29 PM

a good game of free cell


All times are GMT -5. The time now is 05:45 AM.

Powered by: vBulletin Version 3.7.2
Copyright 2000 - 2008, Jelsoft Enterprises Limited.
2008 Shreveport.com