Jump to content

[SOLVED] don't evaluate include


ratcateme

Recommended Posts

I have this script

<?php
header("Content-type: image/jpeg");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
$image = fopen("./images/{$id}.jpg","r");
while(!feof($image)){
echo fgets($image);
}
fclose($image);
?>

it use to look like this

<?php
header("Content-type: image/jpeg");
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); 
include("./images/{$id}.jpg");
?>

but one image i tried to include contained <? so was phrased as php code i want to know if there is a quicker way to include files without them being phrased as php code even if they contain <?. or is the fopen method just as quick as include i also want a method that is easy on ram as my server is kinda low :(

 

Scott.

Link to comment
https://forums.phpfreaks.com/topic/112531-solved-dont-evaluate-include/
Share on other sites

but why open a image in a text editor? you've really lost me lol  :P

did you try??

when u look at it, it is made up from a bunch of characters that make no sense to use reading them but will work for a program displaying them as a image

 

Scott.

i am making an easy to understand CAPTCHA using images like pictures of a ball, flower, homer Simpson, tree ...

then i use $_SESSION to tell display.php which image to display if i used an img tag then a script could easily tell which image is being displayed this way people cant tell which image is being displayed.

 

Scott.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.