Hello, need a function to parse a message entered by a user and try to extract the internet domain name out of it. These are messages for domain for sale, so they quasi always refer to a domain name in the title. However, sometimes users enter the domain name in several words (esp in the title) or with punctuations or only in the body of the message.
You are asked to write one function that will accept 2 parameters: the title of the message (always), and the content of the message (not always. Can be NULL). It must return the domain name, without the subdomain, or FALSE if no domain name could be extracted.
parse_domain("[url removed, login to view] Domain name... Money Making",NULL)
should return: "BarackObamainfo4u.com"
Here is goal: your script should be able to extract the domain name out of the title of the message in at least 50% of the cases, with less than 1% or errors. When you script cannot reliably extract the name from the title, you can use the body of the message and get the domain name in 75% of the time, also with less than 1% of error.
Attached is a list of sample message titles and corresponding message content, as a PHP array. I'll send more samples by PM when you bid.
17 pekerja bebas membida secara purata $44 untuk pekerjaan ini
Hi, my name is Patrick and I am in the USA. I can write you the PHP code necessary to do exactly what you need. I am available to work on this immediately, let me know if you have any questions.