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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.