If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Oct 2007
    Member #
    I know we really shouldnt prevent thr right clicking because it does not protect much, however, if we do that, does it automatically prevent hotlinking to our site or not? If not then I will have to go through all the steps to do that (prevent hotlinking), which I am trying to avoid for now....


  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Cottage Grove, Minnesota
    Member #
    718 times
    Hotlinking is a setting in either your webhost's control panel (for your site),
    or you could possibly utilize .htaccess (search Google for examples).

    You can also use PHP to render the image from a script,
    where the end-user has no idea where it came from.

    Like this ...
    First, create a PHP script called "image.php" (see below).

    PHP Code:
    // path to your images (where they are stored). 
    // include the trailing forward slash / 


    // Get the dimensions 
    list($width_orig$height_orig) = getimagesize($filename); 

    // Resize if needed (in this example, full size ... no reduction). 

    // Example of half-size reduction. 

    // Resample 
    $image_p imagecreatetruecolor($width$height); 
    $image imagecreatefromjpeg($filename); 

    // Output 
    header('Content-type: image/jpeg'); 

    // Clean-up Memory 
    Now use this on your HTML pages for each image ...

    <img src="image.php?p=mypic.jpg">

    The source of the image will be unknown, but the image will appear.
    (this is for JPG or JPEG images only).

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 05:01 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: