Linking to images above the webspace
Linking to images above the webspace
am 17.07.2009 14:19:06 von Al
I've got a php script in which I'd like to link to an image above the webspace
[doc-root] and render it as
or
Anyone know how this can be done? Googling always refers me to document_root,
where absolute or relative.
Do I first have to make a copy of the image and put it below doc_root?
Thanks....
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Linking to images above the webspace
am 17.07.2009 14:23:30 von Nitsan Bin-Nun
--0016e6dee96e59016c046ee5dc4f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
You can create a PHP script which will serve files based on their location
which will be transfered through a GET parameter.
Just send the correct response headers which will be corresponded to the
file's mime type, size, etc.
Then use something like:

Good luck!
On Fri, Jul 17, 2009 at 2:19 PM, Al wrote:
> I've got a php script in which I'd like to link to an image above the
> webspace [doc-root] and render it as
or
>
> Anyone know how this can be done? Googling always refers me to
> document_root, where absolute or relative.
>
> Do I first have to make a copy of the image and put it below doc_root?
>
> Thanks....
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--0016e6dee96e59016c046ee5dc4f--
Re: Linking to images above the webspace
am 17.07.2009 14:28:12 von Michelle Konzack
--=_vserver1-27554-1247834005-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Am 2009-07-17 14:23:30, schrieb Nitsan Bin-Nun:
> You can create a PHP script which will serve files based on their location
> which will be transfered through a GET parameter.
> Just send the correct response headers which will be corresponded to the
> file's mime type, size, etc.
>=20
> Then use something like:
> 
>=20
> Good luck!
"Good luck!" is good... He should be careful with such stuff... because
someone can do something like:
wget http://${SERVER}/a.php?image_full_path=3D/etc/passwd
Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--=20
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack c/o Shared Office KabelBW ICQ #328449886
+49/177/9351947 Blumenstasse 2 MSN LinuxMichi
+33/6/61925193 77694 Kehl/Germany IRC #Debian (irc.icq.com)
--=_vserver1-27554-1247834005-0001-2
Content-Type: application/pgp-signature; name="signature.pgp"
Content-Transfer-Encoding: 7bit
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFKYG5cC0FPBMSS+BIRAgNmAJ90vKzdpFbPgBDlerycNdveXF6TiwCg pALL
VETKisD5kE0DStmfWtpo278=
=O3k6
-----END PGP SIGNATURE-----
--=_vserver1-27554-1247834005-0001-2--
Re: Linking to images above the webspace
am 17.07.2009 14:44:05 von Nitsan Bin-Nun
--001636c92477fe7fe1046ee625f7
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Everyone should be careful with every stuff, you can also inject a
LOAD_FILE('/etc/passwd') into a MYSQL query easily.
On Fri, Jul 17, 2009 at 2:28 PM, Michelle Konzack <
linux4michelle@tamay-dogan.net> wrote:
> Am 2009-07-17 14:23:30, schrieb Nitsan Bin-Nun:
> > You can create a PHP script which will serve files based on their
> location
> > which will be transfered through a GET parameter.
> > Just send the correct response headers which will be corresponded to the
> > file's mime type, size, etc.
> >
> > Then use something like:
> > 
> >
> > Good luck!
>
> "Good luck!" is good... He should be careful with such stuff... because
> someone can do something like:
>
> wget http://${SERVER}/a.php?image_full_path=/etc/passwd
>
>
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
> Systemadministrator
> Tamay Dogan Network
> Debian GNU/Linux Consultant
>
>
> --
> Linux-User #280138 with the Linux Counter, http://counter.li.org/
> ##################### Debian GNU/Linux Consultant #####################
> Michelle Konzack c/o Shared Office KabelBW ICQ #328449886
> +49/177/9351947 Blumenstasse 2 MSN LinuxMichi
> +33/6/61925193 77694 Kehl/Germany IRC #Debian (irc.icq.com)
>
--001636c92477fe7fe1046ee625f7--