Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
About Us Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Closed Thread
 
LinkBack Thread Tools Display Modes
Old August 30th, 2003   #1 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
PHP script in image discussion

OK well i remember seeing Kane IIRC trying to do this once for a random avatar script that works with vBulletin (they dont allow php as avatars..)
Well this just got my attention. Most of you have probably seen this image many times



it runs a PHP script in the picture. Maybe it could be a way to have a random image script in the picture. I dont know if your following me here...
Aniway i made this thread so ideas can be givin on how this could be done (if it can be done) since the author of that image wont reveal his code (of course :P).

so if anyone has an idea then please share with others. im probably not the only one who is interested in this
Chrono Archangel is offline  
Old August 30th, 2003   #2 (permalink)
Ramsus K
 
Join Date: Mar 2003
Location: Oklahoma
Posts: 461
Re: PHP script in image discussion

Here's how: They use some of the information you send in your HTTP Get request header when your browser requests the image from their server (which is really a program that is set up to be executed when "http://www.danasoft.com/vipersig.jpg" is requested). It then generates a JPEG image, sends an HTTP header in reply saying they're sending Content-Type image/jpeg and sends over the generated JPEG image.

I don't have any HTTP references on hand, and I don't do any real server-side development regularly, so I can't post any code examples.

EDIT: Maybe I'll write something a bit later, eh?
RamsusX is offline  
Old August 30th, 2003   #3 (permalink)
Ramsus K
 
Join Date: Mar 2003
Location: Oklahoma
Posts: 461
Create a simple PHP script that gets the HTTP header information from the proper environment variables like this one: http://ramsus.guiltyparties.com/image.php.txt

It could also make use of other information obtainable not just through CGI environment variables provided by the server, but also by piping the output of a program.

Create an image like this one: http://ramsus.guiltyparties.com/test.png

Then add a .htaccess file to a subdirectory with the contents:

Action image/png /image.php

I added mine to http://ramsus.guiltyparties.com/image/ so now any request to a .png file from that location will return the output of http://ramsus.guiltyparties.com/image.php (keep in mind that even if there is a .png file already there, it will still return the output of image.php instead, which is why I put it into a subdirectory).

See here: http://ramsus.guiltyparties.com/image/whatever.png
RamsusX is offline  
Old August 30th, 2003   #4 (permalink)
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
Re: PHP script in image discussion

It is impossible to make a random avatar on emuforums since it makes it's own local copy of your avatar.
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10
scottlc is offline  
Old August 31st, 2003   #5 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Re: Re: PHP script in image discussion

Quote:
Originally Posted by scott_uk5
It is impossible to make a random avatar on emuforums since it makes it's own local copy of your avatar.
even if its offlinked?

oh and RamsusX. thx for all that info ill look more into it since im no hardcore php coder :P but its eems wuite simple how you explain it thx
Chrono Archangel is offline  
Old September 1st, 2003   #6 (permalink)
Emulation64's Animal >:D
 
Keith's Avatar
 
Join Date: Apr 2001
Location: United States
Posts: 1,215
Re: PHP script in image discussion

yeah vB makes a local copy of the avatars when offlinked so .. it won't work. I have a script that works great and could be used with the .jpg or .gif extension rather then .php .. which helps get around some restriction some boards have for dynamic signatures. It does work on the avatar as well, but only forums that do not mirror a copy localy.
__________________




Emulation64.com | EFx2Blogs Forums | EFx2Blogs - Sign Up For Your Own Free EFx2Blog Today!
Keith is offline  
Old September 1st, 2003   #7 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Re: Re: PHP script in image discussion

Quote:
Originally Posted by Keith
yeah vB makes a local copy of the avatars when offlinked so .. it won't work. I have a script that works great and could be used with the .jpg or .gif extension rather then .php .. which helps get around some restriction some boards have for dynamic signatures. It does work on the avatar as well, but only forums that do not mirror a copy localy.
ohh ok. is there a feature in the admin panel that can remove that? i mean it should have such an option. no?
Chrono Archangel is offline  
Old September 1st, 2003   #8 (permalink)
Emulation64's Animal >:D
 
Keith's Avatar
 
Join Date: Apr 2001
Location: United States
Posts: 1,215
Re: PHP script in image discussion

no clue, I could look on EmuTalk.net .. I am an admin there so I could check to see if an option exists.
__________________




Emulation64.com | EFx2Blogs Forums | EFx2Blogs - Sign Up For Your Own Free EFx2Blog Today!
Keith is offline  
Old September 1st, 2003   #9 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Re: Re: PHP script in image discussion

Quote:
Originally Posted by Keith
no clue, I could look on EmuTalk.net .. I am an admin there so I could check to see if an option exists.
ok. but isnt PHPscript like that in an image dangerous for the other forums? i mean anyone could launch a script int heir an possibily do dammage?
Chrono Archangel is offline  
Old September 1st, 2003   #10 (permalink)
Ramsus K
 
Join Date: Mar 2003
Location: Oklahoma
Posts: 461
Re: Re: Re: PHP script in image discussion

Quote:
Originally Posted by Chrono Archange
ok. but isnt PHPscript like that in an image dangerous for the other forums? i mean anyone could launch a script int heir an possibily do dammage?
No, it's perfectly secure.
RamsusX is offline  
Old September 1st, 2003   #11 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Re: PHP script in image discussion

but i mean like if you take Invision board for exemple. couldnt you right a script to get the config file and upload it to where ever you want?
Chrono Archangel is offline  
Old September 1st, 2003   #12 (permalink)
Ramsus K
 
Join Date: Mar 2003
Location: Oklahoma
Posts: 461
Re: Re: PHP script in image discussion

Quote:
Originally Posted by Chrono Archange
but i mean like if you take Invision board for exemple. couldnt you right a script to get the config file and upload it to where ever you want?
The PHP script isn't IN the image. A PHP script creates the image and sends it. This means that the image that has been created is just an image. It can't do anything an image can't do.

The server with the Message Board doesn't even touch the image unless it's stored locally on the server. It simply sends HTML with an IMG tag with the URL to the image. Your browser is what downloads the image. The image data is never touched by the server with the message board.
RamsusX is offline  
Old September 1st, 2003   #13 (permalink)
Administrator
 
Chrono Archangel's Avatar
 
Join Date: Dec 2001
Location: Montreal, Canada
Posts: 7,129
Re: Re: Re: PHP script in image discussion

Quote:
Originally Posted by RamsusX
The PHP script isn't IN the image. A PHP script creates the image and sends it. This means that the image that has been created is just an image. It can't do anything an image can't do.

The server with the Message Board doesn't even touch the image unless it's stored locally on the server. It simply sends HTML with an IMG tag with the URL to the image. Your browser is what downloads the image. The image data is never touched by the server with the message board.
ohhh ok. now i get it. so each time the script is read it makes a new pictures depending on what is changed. see i thought the script was in the image....its all clear now
Chrono Archangel is offline  
Old September 1st, 2003   #14 (permalink)
Administrator
 
Bobbi's Avatar
 
Join Date: Apr 2001
Location: Germany
Posts: 2,026
Re: PHP script in image discussion

Well, let's jump straight into this thread The way vBulletin caches stuff *is* for security reasons ... this isn't directly related to the PHP code being any dangerous (which it isn't, as it gets executed on another server) but the possibility to get the session ID of an user through this. However it needs to be added, that vB3 has a pretty complex but good way to work around this - however, as it's still in beta testing stages, this is de-activated for now. Look forward to host dynamic signatures @ NGEmu starting with vB3 RC1.
__________________

Specs: AMD Athlon 64 4000+ • 2048 MB PC400 RAM • Nvidia GeForce 7600 GT PCI-E • WinXP Pro
Bobbi is offline  
Old September 1st, 2003   #15 (permalink)
~¤ PanZeR ¤~ idRO Thor
 
Galway no Sora's Avatar
 
Join Date: Mar 2003
Location: Valhalla, in Odin's throne
Posts: 3,145
Re: PHP script in image discussion

Good news from you, Bobby. At least we don't need to create that difficult script for dynamic sign .
__________________



Core 2 Duo 1.6 GHz «» 2048MB DDR2 RAM «» 256MB onboard Graphic
Onboard Realtek High Definition Soundcard «» 160 + 40 GB SATA HDD
Pioneer DVD±RW «» 15.4" Widescreen LCD «» Windows Vista Ultimate

Sucks ha? Yeah, that's a laptop for sure.
Galway no Sora is offline  
Old September 1st, 2003   #16 (permalink)
Registered User
 
scottlc's Avatar
 
Join Date: Sep 2002
Location: St Andrews, Scotland
Posts: 1,575
Re: PHP script in image discussion

Let me just elaborate on what Bobbi has said. If users disable the use of cookies then vBulletin stores the user id in the URL. So a script could analise the HTTP_REFERER and then learn your session ID.
__________________
OS: Arch Linux w/ Kernel 2.6.23.8 + GNOME 2.20.1 - CPU: Intel Pentium M 1.5GHz - Memory: 1280MB DDR PC2700 - Browser: Mozilla Firefox 2.0.0.10
scottlc is offline  
Old October 18th, 2004   #17 (permalink)
Registered User
 
Join Date: Oct 2004
Location: uk
Posts: 1
hey ive got a script its working but not exactly as danasoft
i just wana know wot script rasmusx used to do it.

here is my working one if anyone want to know how i did please post or else i wouldn't be asked to.
change the x's in http://icefuzion.com/mm/xxxx.jpg into what ever you want.
here is an example.
nitr021 is offline  
Old October 25th, 2004   #18 (permalink)
A1C
 
Ramsus K's Avatar
 
Join Date: Jan 2004
Location: California
Posts: 230
Don't bring up dead threads, especially with off-topic posts.

Also, I just went and wrote my own PHP script, but that post is a few years old so it isn't around anymore. It takes only a few minutes to write one and photoshop some images.
Ramsus K is offline  
Old October 26th, 2004   #19 (permalink)
RF
Canadian Spaceman
 
RF's Avatar
 
Join Date: May 2002
Location: Canada
Posts: 8,580
Yes, please dont revive old threads.

-Closed
__________________
RF is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 21:54.

© 2006 - 2008 Emu Forums | About Emu Forums | Legal | A member of the Crowdgather Forum Community


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5