Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to detect a Link in a Forum or Guestbook?

Status
Not open for further replies.

innu

Programmer
Jun 13, 2001
40
AT
Hi,

I've made a guestbook on my side, but now I want, that if someone writes a Link it should detect it and make the html code for it.

Has anyone a solution for me?

sl,
innu
 
what do you mean "if someone writes a link" ?
does it have to begin with http:// ? do you have a special input box ? a special tag ?
 
well then jsut detect every parse them
but what if the user enters an url WITHOUT as imp.someprovider.com ??)
maybe you could check against a reg exp that detects xxx.xxx.xxx.xx ??? but then again what if the adress is only something.com ? detect all xxx.xx ? what if someone just writes some oo code like this.my_func ?
really you should make your users add a special tag - such as ... - then detect this tag and parse it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top