Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / Active forum signitures?

Author
Message
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 2nd Dec 2005 19:07 Edited at: 2nd Dec 2005 22:30
I've noticed that a few people have signitures that display certain information about your own computer (browser, o/s etc) and also that some people have/used to have random quotes as signitures - how do you do this? I was wondering if I could write a code to display random signiture images, as I have lots and keep making more, its fun to swap them around, mbut might be more fun to have maybe 10 which display randomly, and then update them every couple of weeks or whatever...

Thanks

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 2nd Dec 2005 19:10
Its dynamic image generation with php. If you want me to explain in more detail then MSN me or email me at mnemonix@logicstudios.net

WE SHALL BECOME ALL POWERFUL! CRUSH THE LESSER RACES! CONQUER THE GALAXY! UNIMAGINABLE POWER! UNLIMITED RICE PUDDING ! ! ! ETC. ! ! ! ETC.! ! !
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 2nd Dec 2005 19:10 Edited at: 2nd Dec 2005 19:11
I believe that its a dynamic PHP image thingy that does those types of sigs. Not sure how though

[Mnem's post wasn't here when I pressed post. Sorry]

blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 2nd Dec 2005 20:06
Every time you connect to a web page, whether it to be to download the content (or to ask for an external image), your browser immediately spams the server with most of the information you see on signature images about you.

The IP address is gotten simply because it's a TCP connection, and Winsock Knows These Kind Of Things.

From there, you simply tell your webserver to run a script (to generate an image) or some DLL or something and get it to return that.

Simple enough, but still a bit of a bitch on the ol' server resources, seeing as you have to dynamically generate the images every time...

16-colour PNGs pwn.
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Dec 2005 20:10
Quote: "Simple enough, but still a bit of a bitch on the ol' server resources, seeing as you have to dynamically generate the images every time..."

Actually I think you just have to return an image address.

Tempest - P2P UDP Multiplayer Plugin - 62%
David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Dec 2005 20:17
No you return the whole image data.

Unless of course you just use a php header redirect to go to a random image - in which case the browser cache might kick in?

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Dec 2005 20:33
Oh well then, it's not much different than just using a static image(bandwidth wise).

Tempest - P2P UDP Multiplayer Plugin - 62%
re faze
20
Years of Service
User Offline
Joined: 24th Sep 2004
Location: The shores of hell.
Posted: 2nd Dec 2005 20:59
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 2nd Dec 2005 21:00 Edited at: 2nd Dec 2005 22:30
Ahh cool thanks that makes sense

Anyone got an example for a random image out of a given directory or list file?

If not don't worry I can google

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Dec 2005 21:02 Edited at: 2nd Dec 2005 21:02
say images are called image1.jpg to image10.jpg

randompic.php:


and then

[img ]whatever.com/randompic.php [ /img]

Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 2nd Dec 2005 21:46 Edited at: 2nd Dec 2005 22:30
wow as simple as that? Cool! thanks

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 2nd Dec 2005 21:49
Yep thats how you do a random image selector.

WE SHALL BECOME ALL POWERFUL! CRUSH THE LESSER RACES! CONQUER THE GALAXY! UNIMAGINABLE POWER! UNLIMITED RICE PUDDING ! ! ! ETC. ! ! ! ETC.! ! !
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Dec 2005 22:08 Edited at: 2nd Dec 2005 22:09
Quote: " any way to mask your ip?"

Nope. Unless you write the IP packets yourself, but in that case you wouldn't even be able to establish a connection as the remote peer wouldn't know where to send data. Why would you want to mask your IP, anyway?

Tempest - P2P UDP Multiplayer Plugin - 62%
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 2nd Dec 2005 22:16
I don't think David T's way will work --- but I haven't tried. You might end up redirecting the page over to the image, rather than just the img box.

It's rather simple to do this kind of thing, though. I had to do a random image thingie for my last boss, and it would apply their copyright text to every uploaded image then save it to their server in GIF, JPG or PNG. It was pretty cool. My sig is the simplest example of dynamic text. It just grabs the name of my most recent blog entry :-P

David T
Retired Moderator
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 2nd Dec 2005 22:17
Quote: "I don't think David T's way will work --- but I haven't tried. You might end up redirecting the page over to the image, rather than just the img box."


I use it myself

Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 2nd Dec 2005 22:24 Edited at: 2nd Dec 2005 22:36
hmm testing

[edit] it appears to work fine, but I had to change the rand statement to "rand(1,10);"

thanks guys thats really cool

Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 2nd Dec 2005 22:29 Edited at: 2nd Dec 2005 22:42
Hmmm all worked fine and I refreshed a few times to watch it change, but now it seems to be stuck on just one image, the snoopy one... Iguess that is because the browser has stored it as a temporary file to stop it loading each time, thinking the php file actualy looks like the snopy image? I refreshed many times and stil kept getting snoopy so I'm sure its not just randomly selecting the same image....

[edit] ahh I just closed the browser completely and loaded it again, voila new image. Oh well thats not as serious a flaw as I initially thought then

JoelJ
21
Years of Service
User Offline
Joined: 8th Sep 2003
Location: UTAH
Posted: 2nd Dec 2005 23:24
ctr-f5
that refreshes teh cache too

[center][center]
Manticore Night
21
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 3rd Dec 2005 00:01
Do you need any special editor for php, I think I'd like to try this?

[center]It's amazing how much TV has raised us. (Bart Simpson)

He's back! With 20% less intelligence!
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 3rd Dec 2005 01:19
nope just write it in notepad and save it as a .php not .txt

You'll need webspace that supports it though obviously

Manticore Night
21
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 3rd Dec 2005 02:10
I'm less than a noob at PHP so, would anyone know how to do this if my sigs are on a different site(photobucket).

[center]It's amazing how much TV has raised us. (Bart Simpson)

He's back! With 20% less intelligence!
Kangaroo2 BETA2
21
Years of Service
User Offline
Joined: 23rd Aug 2003
Location: Somerset / UK
Posted: 3rd Dec 2005 02:19
in theory if you could get photobucket to have the last digit of the name to be in sequence it'd work fine, but don't they rename your images to whatever they want? If not then thats fine

Trouble is you'd still need somewhere to upload your .php file to and most free hosts don't support them.

dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 3rd Dec 2005 02:24 Edited at: 3rd Dec 2005 02:24
Yah it is hard to find a "free" host with php support. Though, madmanhosting.tk will eventually have support for php.
(1 gig of space and unlimited bandwidth though the servers down right now. )

Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 3rd Dec 2005 02:35 Edited at: 3rd Dec 2005 02:35
Quote: "Mnem's post wasn't here when I pressed post. Sorry"


Apology not accepted, be more careful next time!


"Computers are useless, they can only give you answers."
Manticore Night
21
Years of Service
User Offline
Joined: 23rd Oct 2003
Location: Ouinnipeg
Posted: 3rd Dec 2005 04:48
I should check if freewebs has php support, even as one of those buying features. I might even start paying my site bills again.

[center]It's amazing how much TV has raised us. (Bart Simpson)

He's back! With 20% less intelligence!
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 3rd Dec 2005 18:55
FreeWebs has sod all.

No scripting support, just slow pure webspace.

16-colour PNGs pwn.
ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 3rd Dec 2005 19:09
Here's a more detailed example



AdamGameSource.com 3d Model Competition

Don't support the ANJL: You were a noob once too.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 5th Dec 2005 00:20
I can post (or email) the code to mine if you like? I use PHP (with GD imaging enabled, you can tell that by looking up with php info command). Lemme know.

Btw: Everytime you load a thread, PHP picks a quote at random.

Login to post a reply

Server time is: 2024-11-16 04:47:05
Your offset time is: 2024-11-16 04:47:05