We are new to this site/service, so this is a test project for us, but we have many others coming up. We're looking for someone to do a great job for a fair price so we can give more of these types of projects in the future. Here it is...
We would like a function written in PHP that will receive a block of plain text, find anything inside the text that looks like a link, and convert that text into an HTML link. A quick example of how we would utilize this function:
// start code
$sample_text = "If you would like to become a computer programmer,n read more here: www.programmingtutorials.com/php.aspx";
$formatted_text = addHtmlLinks($sample_text);
echo $formatted_text;
// end code
this should print:
If you would like to become a computer programmer,
read more here: <a href="http://www.programmingtutorials.com/php.aspx">www.programmingtutorials.com/php.aspx</a>
*Input parameters: *
plain text, can be multiple lines
*Links *either start with http://, or with www., or contain an alpha-numeric word followed by ".com", ".org", ".net" or ".edu":
* http://<valid url here>
ex: [login to view URL] [login to view URL] [login to view URL]
* www.<url>
ex: [login to view URL] [login to view URL] [login to view URL]
* .com, .org, .net, and .edu
ex: [login to view URL] [login to view URL]
Be sure to prefix all links in the <A> tag with "http://": [login to view URL] will link as [login to view URL]
*Output: *
return the original block of text with the links embedded.
Ex:
---text block---
Computer programming (often shortened to programming or coding) is the process of writing, testing,
and maintaining the source code - [login to view URL] - of computer programs.
According to [login to view URL] the source code is written in a programming language.
---end text block---
the return value should be:
---return---
Computer programming (often shortened to programming or coding) is the process of writing, testing,
and maintaining the source code - <a href="http://en.wikipedia.org/wiki/Source_code">http://en.wikipedia.org/wiki/Source_code</a> - of computer programs.
According to <a href="http://tinyurl.com/4zrhg">tinyurl.com/4zrhg</a> the source code is written in a programming language.
---return---
Hello!
I can do it for You for only $30.
It will take me no longer than few hours.
if You choose me I will do my best to do it as soon as possible.
thanks
BirdWatcher
Hi,I can get this done super fast for you! I'm looking for a long term relationship, working relationship that is ;o). Hope to hear from you soon!
-Mike
Be careful with who you hire for this; it's not as straightforward as it sounds. I've got a function I've been using for years to parse links in user comments - it's ready to go.
Might the next project be spotting which links go to images and giving people a clickable thumbnail..?