Jump to content

I need help with PHP


falarious

Recommended Posts

it isn't possible to hide the source code itself, but you can use a PHP file as the source itself.

[code]<img src="showImage.php?image=hidden.gif" />[/code]

showImage.php would look something like this:

[code]<?php
$filename = $_GET['image'];
$handle = fopen($filename, "r");
$image_resource = fread($handle, filesize($handle));
fclose($handle);
echo $image_resource;
?>[/code]

keep in mind that you may need to change the path, add error checking, etc.  but that should accomplish (minimally) what you're after.
Link to comment
https://forums.phpfreaks.com/topic/14703-i-need-help-with-php/#findComment-58656
Share on other sites

if you dont want them to see the filename, simply put it locally in the showImage.php, like so:

[code]<img src="showImage.php" />[/code]

and change the line in showImage.php to:

[code]$filename = 'hidden.gif';[/code]

it all depends on whether you have multiple images you want to hide.
Link to comment
https://forums.phpfreaks.com/topic/14703-i-need-help-with-php/#findComment-58754
Share on other sites

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.