Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]>

> that was explaining the prinicple.
>
> of course you wouldn't do it like this, but pass an id to identify. you
> could also send an encryption key...

Ok. I'm sure the original poster is grateful. Hopefully, if anyone actually
searches those things called the archives, they'll now realize the intent of
your code snippet, also. :)

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread Toby Irmer
that was explaining the prinicple.

of course you wouldn't do it like this, but pass an id to identify. you
could also send an encryption key...

- Original Message -
From: "CPT John W. Holmes" <[EMAIL PROTECTED]>
To: "Toby Irmer" <[EMAIL PROTECTED]>; "Mike R" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 5:15 PM
Subject: Re: Re[4]: [PHP] Re: jpeg Uploader issue


> From: "Toby Irmer" <[EMAIL PROTECTED]>
>
> > file: show.php
> >
> >  > header("Content-type: image/jpeg");
> > readfile("/path/to/file/".$_GET["filename"]);
> > ?>
> >
> >
> > in your files:
> >
> > 
> >
> > or something like that ;)
>
> Are you trying to get him to compromise his server? I'm sure that's just a
> simple suggestion, but it's horrible. This will allow a user to request
the
> contents of any file PHP has access to read...
>
> ---John Holmes...
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread CPT John W. Holmes
From: "Toby Irmer" <[EMAIL PROTECTED]>

> file: show.php
>
>  header("Content-type: image/jpeg");
> readfile("/path/to/file/".$_GET["filename"]);
> ?>
>
>
> in your files:
>
> 
>
> or something like that ;)

Are you trying to get him to compromise his server? I'm sure that's just a
simple suggestion, but it's horrible. This will allow a user to request the
contents of any file PHP has access to read...

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread Toby Irmer
file: show.php




in your files:




or something like that ;)

hth

toby

- Original Message - 
From: "Mike R" <[EMAIL PROTECTED]>
To: "Richard Davey" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 15, 2004 5:03 PM
Subject: RE: Re[4]: [PHP] Re: jpeg Uploader issue


> 
> Since the link goes directly to the picture, how do I apply the header
> first?  Should I apply it in the html page the link is on?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-15 Thread Mike R

Since the link goes directly to the picture, how do I apply the header
first?  Should I apply it in the html page the link is on?

:)

Thanks!

-Mike



>
> Hello Mike,
>
> Tuesday, January 13, 2004, 5:31:47 PM, you wrote:
>
> MR> That's what I kind of thought, but this is a case where the browser is
> MR> opening the image directly - there is no html code or
> placement in an html
> MR> page.
>
> It doesn't matter, it's still being served via HTTP and that's what
> you're trying to emulate. Here is a typical (real live) image request
> as seen from a browser:
>
> HTTP/1.1 200 OK
> Date: Tue, 13 Jan 2004 17:54:28 GMT
> Server: Apache/1.3.26 (Unix)
> Last-Modified: Mon, 31 Mar 2003 23:40:00 GMT
> ETag: "64060d-18b4-3e88d1d0"
> Accept-Ranges: bytes
> Content-Type: image/gif
>
> The image in question was actually:
> http://tucows.easynet.net/images/logo.gif
>
> Just happened to be on that page at the time :)
>
> --
> Best regards,
>  Richardmailto:[EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: Re[4]: [PHP] Re: jpeg Uploader issue

2004-01-13 Thread Mike R

Sinc the link goes directly to the picture, how do I apply the header first?
Should I apply it in the html page the link is on?

:)

Thanks!

-Mike



>
> Hello Mike,
>
> Tuesday, January 13, 2004, 5:31:47 PM, you wrote:
>
> MR> That's what I kind of thought, but this is a case where the browser is
> MR> opening the image directly - there is no html code or
> placement in an html
> MR> page.
>
> It doesn't matter, it's still being served via HTTP and that's what
> you're trying to emulate. Here is a typical (real live) image request
> as seen from a browser:
>
> HTTP/1.1 200 OK
> Date: Tue, 13 Jan 2004 17:54:28 GMT
> Server: Apache/1.3.26 (Unix)
> Last-Modified: Mon, 31 Mar 2003 23:40:00 GMT
> ETag: "64060d-18b4-3e88d1d0"
> Accept-Ranges: bytes
> Content-Type: image/gif
>
> The image in question was actually:
> http://tucows.easynet.net/images/logo.gif
>
> Just happened to be on that page at the time :)
>
> --
> Best regards,
>  Richardmailto:[EMAIL PROTECTED]
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php