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 Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/ 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/ Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/#findComment-1161301 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 Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/#findComment-1161780 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. Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/#findComment-1161783 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? Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/#findComment-1161805 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. Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/#findComment-1161807 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 Link to comment https://forums.phpfreaks.com/topic/224832-html-links-in-submitted-forms/#findComment-1162058 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.