Trying to get all images accessed to run a script before they are sent in a response

Discussion in 'Web Development' started by commander, Nov 20, 2008.

  1. commander

    commander New Member

    Joined:
    Nov 20, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    I am trying to make it so that all .png images in the directory ./cards to run a php script before they are accessed and sent as a response. I suspect that this might be possible through a .htaccess but i'm not sure, and if I am correct about my assumptions I have no idea where to start looking for information on accomplishing this. If anyone could push me in the right direction (or give me a sample of this in action) then please give me some input.

    Any help would be most appreciated!

    -Anthony
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Re: Trying to get all images accessed to run a script before they are sent in a respo

    You can do it with mod_rewrite, rewrite the url to call a php/perl script with will do the work u want and then pass ur image!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice