NYCPHP Meetup

[nycphp-talk] PHP project from Hell Story

Brian Pang bpang at bpang.com
Fri Aug 22 15:20:37 EDT 2003


actually, i take that back

you could base64_encode() the image file data into a single php file,
with the call to the image then setting the headers and delivering
base64_decode()d image data

something like



fool.php
---

<?
if (!$_GET['imageID']) {
?>
blah blah blah
<img src="<?=$_SERVER['PHP_SELF']?>?imageID=1">
<?
}
else {
    switch($_GET) {
        case "1":
            header("Content-type: image/jpg");
            base64_decode("INSERT BASE 64 ENCODED IMAGE HERE");
            break;
    }
}
?>

right? Wouldn't this work? It's spastic and this is just a (more or
less) theoretical example that would need to be properly written.

Thoughts?





> I can't think of any way that it could possibly be a SINGLE upload.
> 
> Even, as was mentioned in the origial post, FrontPage was used. There
> would still be multiple files sent to the server.
> 
> 
> 
> > This is a multi-part message in MIME format.
> > 
> > 
> > See below!
> >   ----- Original Message ----- 
> >   From: Aaron Fischer 
> >   To: NYPHP Talk 
> >   Sent: Friday, August 22, 2003 2:57 PM
> >   Subject: Re: [nycphp-talk] PHP project from Hell Story
> > 
> > 
> >   1. You did, but you also said if he had Illustrator. Maybe he is
> thinking he needs to buy Illustrator as well?
> > 
> >   He has Illustrator and doesn't want to use that because he says it
> wants to "keep it simple" for his clients.
> > 
> >   2. Another option:
> >   He can output them directly to html from Word. Word creates the page
> and a folder to hold the images and an xml file. If he FTP's the page
> and the folder to a directory it will work. No renaming necessary. I
> just did it, took me under a minute.
> > 
> >   He doesn't want to FTP either.  I suggested that and he refuses
> stating that it's more work than he wants.  He wants it so that the HTML
> file, images and all, go at once to the same server, embedded as if they
> were the original .doc file.
> > 
> >   3. Of course, you could build him a form page that lets him type in
> some text and upload the image file and write the php which creates the
> html page upon submission...
> > 
> >   Nixed that too.  He wants a single upload.  He doesn't want to do
> any more work because it's "out of scope" with what he wants.
> > 
> >   -A
> > 
> >   On Friday, Aug 22, 2003, at 14:47 US/Eastern, Phil Powell wrote:
> > 
> > 
> >     I suggested it, that is what prompted his response.  He refuses to
> get Acrobat and expects ME to do everything about it!
> >      
> >     Phil
> > 
> > 
> >
>
------------------------------------------------------------------------------
> > 
> > 
> >   _______________________________________________
> >   talk mailing list
> >   talk at lists.nyphp.org
> >   http://lists.nyphp.org/mailman/listinfo/talk
> > 
> > 
> 
> 
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> 






More information about the talk mailing list