What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » General Chit Chat » php script...

Pages: (4): « First « 1 2 [ 3 ] 4 » Last »
php script...
Author: Message:
Eric
Junior Member
**

Avatar
The miracles of PHP

Posts: 52
49 / Male / –
Joined: Mar 2004
O.P. RE: php script...
k I think that this works for bmps only, is there anyway to do it with animated gifs or pngs. I don't think it will work with animated gifs but still its worth a try :D
king.of.fanelia@Gmail.com
king_of_fanelia@msgplus.net
07-12-2004 06:08 PM
Profile E-Mail PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: php script...
rename the header  :S
07-12-2004 06:09 PM
Profile PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: php script...
Oh, I see. You probably need the "Content disposition" header
use:
code:
header('Content-disposition: inline; filename=example.bmp');

You may want to define the diposition as attachment (instead of inline) if you want the image to prompt a download dialog instead of showing in the browser.

Btw, Content-length is not really needed, but it's "good protocol" to add it. ;)
07-12-2004 06:09 PM
Profile E-Mail PM Web Find Quote Report
Stigmata
Veteran Member
*****



Posts: 3520
Reputation: 45
21 / Other / Flag
Joined: Jul 2003
RE: php script...
quote:
Originally posted by KeyStorm
"good protocol"



and im a good boy :)

and ive already given that header :S

This post was edited on 07-12-2004 at 06:13 PM by Stigmata.
07-12-2004 06:12 PM
Profile PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: php script...
I never gave that header in KSMAS :S :P

It's rather a good compatible behaviour to add as many headers as possible.

* KeyStorm adds content-length to KSMAS :D8-)
07-12-2004 06:16 PM
Profile E-Mail PM Web Find Quote Report
Eric
Junior Member
**

Avatar
The miracles of PHP

Posts: 52
49 / Male / –
Joined: Mar 2004
O.P. RE: php script...
ok lets see man, I write the following into a .php file in notepad:
<?PHP
    header("content-type: image/bmp)
    header("content-length: 28962")
    header("content-disposition: inline; example.bmp")
    echo base64_decode(.....)
?>

ok so what now? I open a bmp file in notepad and copy the crap I see in notepad and paste it into the php file?
king.of.fanelia@Gmail.com
king_of_fanelia@msgplus.net
07-12-2004 06:30 PM
Profile E-Mail PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: php script...
:google:, please!

http://www.mustardlab.com/developer/test/base64.php
07-12-2004 06:34 PM
Profile E-Mail PM Web Find Quote Report
Eric
Junior Member
**

Avatar
The miracles of PHP

Posts: 52
49 / Male / –
Joined: Mar 2004
O.P. RE: php script...
hmmm i ll just use my MySQL Db....thanks anyway
king.of.fanelia@Gmail.com
king_of_fanelia@msgplus.net
07-13-2004 03:55 AM
Profile E-Mail PM Web Find Quote Report
leito
Senior Member
****

Avatar
Chameleon by KeyStorm

Posts: 720
Reputation: 5
38 / Male / –
Joined: Apr 2003
Wink  RE: php script...
some :google: could help:

Base64img, will give you the complete code, in a way you understand it.
I try an animated gif, and works great!
PNG also works, nice.

.php File Attachment: base64img.php (16.84 KB)
This file has been downloaded 279 time(s).

This post was edited on 07-13-2004 at 05:14 AM by leito.
[Image: leonelgalan.png]
07-13-2004 05:07 AM
Profile E-Mail PM Find Quote Report
Eric
Junior Member
**

Avatar
The miracles of PHP

Posts: 52
49 / Male / –
Joined: Mar 2004
O.P. RE: php script...
well i don't have access to the tmp file in my host so I cant make it writable, so it doesnt work, it would be cool if someone uploads it on his/her site and let me use it lol
king.of.fanelia@Gmail.com
king_of_fanelia@msgplus.net
07-13-2004 02:47 PM
Profile E-Mail PM Web Find Quote Report
Pages: (4): « First « 1 2 [ 3 ] 4 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On