Archive for the 'Articles' Category

Sandosh’s new blog

Sandosh’s new blog

Published in: Articles Edit || on December 8th, 2005 | 3 Comments »

FlashImg

For those who have propreity images on their website and want to safegaurd(atleast to some extent) from surfers who just right-click and save or go through the source, find the src and save it, I have a partial solution!

click here for an example!

The solution is to load the image inside a flash object. But then its impossible to make one flash each for every image. So, I made a Flash which can

  • dynamically load Images
  • show the percentage downloaded with a bar
  • dynamically copyright messages or add captions
Here is how to go about it. Download the FlashImg scripts from here.
  1. Unzip the archive. You should find
    • flashimg.php - the php class file
    • images.php - images definition file
    • flashimg.swf - the flash file for loading the images
    • index.php - example file
  2. Edit the images.php file. Will look like this
    include("flashimg.php");
    $img = new ih2hFlashImg;
    //instantiate the class
    $img ->copyRight("© sandosh");
    //Assign default copyright message
    $img->addImg("sandosh","sandosh_alak.jpg",420,315);
    //parameters in order -> name, src, width, height, alt(to override copyright msg)
  3. Include this file in your pages and use
    $img->displayImg("sandosh");
    to display the flashimg, where parameter is the image name.
  4. All done!

Feel free to use this code and also if possible do drop in a line on which site you are using it.

Enjoy! :)

Published in: Articles Edit || on April 9th, 2005 | 72 Comments »