adding html frame to google image results...

Discussion in 'HTML & Website Design' started by Jackie_W, Jan 12, 2009.

  1. #1
    I get quite a lot of traffic to one of my sites from google image search and was wondering if there was any way i could automagically insert the image returned by the image search into a frame or something that said "image taken from www.xxxx.com ?"
     
    Jackie_W, Jan 12, 2009 IP
  2. live-cms_com

    live-cms_com Notable Member

    Messages:
    3,128
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    205
    Digital Goods:
    1
    #2
    You would use javascript to break out of Google's frame, and PHP to check if the referrer is image search and if so add an extra frame.
     
    live-cms_com, Jan 12, 2009 IP
  3. Jackie_W

    Jackie_W Well-Known Member

    Messages:
    1,964
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    115
    #3
    lol you make it sound so easy!
     
    Jackie_W, Jan 12, 2009 IP
  4. live-cms_com

    live-cms_com Notable Member

    Messages:
    3,128
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    205
    Digital Goods:
    1
    #4
    Here's my code for breaking out of Google's frame -

    
    <script type="text/javascript">
    function handleError() {
    top.location.href = location.href
    }
    window.onerror = handleError;
    if (top.location != document.location) {
    	if (top.location.href) {
    		//do nothing
    	}
    }
    </script>
    
    Code (markup):
    The referrer based frame you'll have to write yourself.
     
    live-cms_com, Jan 12, 2009 IP
  5. Jackie_W

    Jackie_W Well-Known Member

    Messages:
    1,964
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    115
    #5
    thanks for that... can anyone give me any pointers for the referrer based frame?
     
    Jackie_W, Jan 12, 2009 IP