leachus2002 Posted January 18, 2011 Share Posted January 18, 2011 Hi There, Is there any way that when a user submits a form, but places a link inside - for example: It is located at this location: http://mylink.com Is there any way that PHP can pick up the fact that there is a link there and tag it correctly so it is clickable? Cheers Matt Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted January 18, 2011 Share Posted January 18, 2011 Check out this link shows you a method of doing this. http://css-tricks.com/snippets/php/find-urls-in-text-make-links/ Quote Link to comment Share on other sites More sharing options...
leachus2002 Posted January 19, 2011 Author Share Posted January 19, 2011 Hi Dragon_Sa, Thanks for that link, very impressive, however it only seams to link addresses that start with www. - some of our servers are local to the network, so would be http://server01, server02 etc etc. Is there any way to make it reconise these? Cheers Matt Quote Link to comment Share on other sites More sharing options...
DarkRanger Posted January 19, 2011 Share Posted January 19, 2011 I don't think it will be able to filter it if it's not a properly formatted URL. Think about it: if server1 or server2 should link to the respective server, it means that any word will possibly be a link. It means then that every word will have to be checked and that will be both memory intense and damn slow. That is ofcourse only if I understand your question correctly. Quote Link to comment Share on other sites More sharing options...
leachus2002 Posted January 19, 2011 Author Share Posted January 19, 2011 So is there no way for it to recognise the HTTP tag and then link that? Quote Link to comment Share on other sites More sharing options...
DarkRanger Posted January 19, 2011 Share Posted January 19, 2011 If it starts with http://, then dragon_sa's link will work. Quote Link to comment Share on other sites More sharing options...
leachus2002 Posted January 19, 2011 Author Share Posted January 19, 2011 Unfortunately not http://www.google.com works but http://server01 does'nt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.