Results 1 to 7 of 7
  1. #1
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default request detection

    do anyone know how to detect linking from other website...

    said, i have a gif file in a webpage, someone use <img src="link to my gif in my webpage" />
    can i detect this?

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Use JEditorPane. Add HTMLEditorKit and hyperlink listener into that. Read the html page and set the text into the JEditorPane. You can easily get the links from there, on HyperlinkEvent.

  3. #3
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default

    ... i mean if i have a gif file in my own webpage
    someone try to link it and show in their webpage, can i detect this?

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    If you want to do this on the html page, you cannot do the way I suggest. Have to go for a server/client side programming such as JSP and so on. Sorry I've not remember a way to do it on JSP.

  5. #5
    Join Date
    Aug 2008
    Location
    Saint-Petersburg, Russia
    Posts
    66
    Rep Power
    0

    Default

    Quote Originally Posted by mtyoung View Post
    ... i mean if i have a gif file in my own webpage
    someone try to link it and show in their webpage, can i detect this?
    Yes you can. E.g. you should generate gif using server side code - php, java etc. - so gif url actually points to your code. Live example :)
    http://www.projectkaiser.com:8080/pk...parentId=15522

    You code can trace calls to gif and analyze "referrer" header of http request.

  6. #6
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    7

    Default

    thx all
    i think i will try to work on referrer of http request

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. brightest red spot detection
    By Bharat in forum New To Java
    Replies: 0
    Last Post: 01-15-2009, 04:21 PM
  2. USB Detection
    By alanixu in forum New To Java
    Replies: 3
    Last Post: 11-12-2008, 05:04 PM
  3. COM Port Detection in Java
    By talasilasumanth in forum Forum Guides
    Replies: 1
    Last Post: 09-10-2008, 04:18 PM
  4. IE Browser Proxy detection
    By bhopalpal in forum Networking
    Replies: 0
    Last Post: 08-21-2008, 03:37 PM
  5. Collision Detection (Game)
    By mscwd in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 01-28-2008, 09:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •