PHP function to replace static URLs to anchors (target=_blank) in posted text from textarea
$5-10 USD
Cancelled
Posted over 17 years ago
$5-10 USD
Paid on delivery
I have a posting form - its a simple text area. I want to make it so that if someone types in a URL, it will automatically recognize it and will translate it to an html link where the target="_blank". I.E. if my text is: "Hi I use [login to view URL] as my search engine." or "Hi I use [login to view URL] as my search engine." it should replace [login to view URL] with <a href="[login to view URL]" target="_blank>[login to view URL]</a> I just need a simple php function that will take take the text string as a parameter and will return the text with the links replaced. Please provide a test file(s) so I can ensure that it is working. It should convert everything to lowercase if needed. <h2>Deliverables</h2> 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.<BR> 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):<BR>a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.<BR>b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.<BR>3) All deliverables will be considered" made="" for="" under="" u.s.="" law.="" will="" receive="" exclusive="" complete="" copyrights="" work="" purchased.="" party="" etc.="" unless="" all="" copyright="" ramifications="" are="" explained="" and="" agreed="" to="" by="" buyer="" on="" site="" per="" the="" seller="" legal="">
</a>
* * *This broadcast message was sent to all bidders on Tuesday Jan 16, 2007 3:41:12 PM:
Two modifications:
1) This needs to also look for https:// urls
2) This should preserve the spacing/formatting that the user has entered in the textarea - but please remove all other html
## Platform
linux, php4