Like http:webmail.wipro.com#a:?b;
I want to break this url and store only webmail and wipro into my database. Can any one help me out with this please. Using php.
Like http:webmail.wipro.com#a:?b;
I want to break this url and store only webmail and wipro into my database. Can any one help me out with this please. Using php.
You should use regular expressions. If you run something like
preg_match('http:(.*?).(.*?).com#a:?b;', 'http:webmail.wipro.com#a:?b;', $matches);
$matches[1] should say webmail and $matches[2] should contain wipro.
There is more documentation for regexes and preg_match on the PHP site.
You should use the parse_url function to retrieve the parts and then use at your will (in your case, saving them in database).
Here is a test code/output from the manual:
Prints the following: