Create a PHP function with regex parser for phone numbers to convert into links

Cancelled Posted Mar 19, 2014 Paid on delivery
Cancelled Paid on delivery

Hi,

I want to have a PHP function that will parse a text searching for phone number patterns. Need to keep a format and create a a link. Here are some examples of what I want:

1-300-400-600 => <a href="[url removed, login to view]">1-300-400-600</a>

020 7378 4482 => <a href="[url removed, login to view]">020 7378 4482</a>

(020) 7378 4482 => <a href="[url removed, login to view]">(020) 7378 4482</a>

(020)-7378-4482 => <a href="[url removed, login to view]">(020)-7378-4482</a>

+0034606890789 => +<a href="[url removed, login to view]">0034606890789</a>

976 789 345 => <a href="[url removed, login to view]">976 789 345</a>

976-789-345 => <a href="[url removed, login to view]">976-789-345</a>

91 37 89 345 => <a href="[url removed, login to view]">91 37 89 345</a>

Only for numbers bigger than 5 digits and smaller than 14 digits. If there is a carry return, end the number. So this would be two different numbers:

1-400-600-700

0001115

As:

<a href="[url removed, login to view]">1-300-400-600</a>

<a href="[url removed, login to view]">0001115</a>

Pretty much the same for any phone number format. The href needs to be always the number without spaces and symbols/or and the anchor must be the same as given.

The function will get as a parameter the text to parse, and will return the same text with the numbers replaces for links.

Also, the tool should get a phone number as a parameter and if this case is found in the text it won't be converted to link.

PHP Software Architecture

Project ID: #5691606

About the project

9 proposals Remote project Active Apr 6, 2014

9 freelancers are bidding on average $27 for this job

acer2004sl

Hello, I got the idea of that function, but will the input text will contain many phone numbers, or each argument will contain only one phone number per time? Best Regards

$45 USD in 1 day
(155 Reviews)
6.0
prakashmondal

hi, I am interested to develop parser to parser phone number as per your given rules. Please see my previous work and let me start the work. Thanks Prakash

$30 USD in 1 day
(39 Reviews)
4.6
SharpCodersPK

I developed the function for you, If you need it I can give you right now. Ready to give you the solution.

$15 USD in 0 days
(22 Reviews)
4.2
withjos

Hey, I might be able to do this job. If you don't mind would I ask you a question? Would you want to detect the numbers in a format like 0000-000 or 000-0000-00 or 0-00-000? Would you just need the function? I mean how More

$35 USD in 1 day
(14 Reviews)
4.1
cijagani

I am specialize in C++,C#.net,ASP.Net,JAVA, PHP, MySQL, Wordpress, Web Designing and framework like CodeIgniter. my aim to deliver quality products to our customers within specified deadline. If hired by you I will p More

$24 USD in 1 day
(6 Reviews)
2.6
sofienesof

Hi pirneo, I hope that you are still looking for someone to do this task, I will be pleased to do it for you; send me a private message when you will be online. Thanks, Sofienesof

$23 USD in 1 day
(1 Review)
0.8
vineeshkc

Hello sir, i am a 3+ year experienced PHP developer ,if you allow means now itself i can start coding, i am waiting for your reply

$30 USD in 1 day
(0 Reviews)
0.0