Is there a way to detect if a string is a Ip or Domain using php, example below.
$string = "http://192.168.0.0";
$string = "http://example.com";
So if the string is a IP the script/function will do something if it detects it as Domain it will do something else.
Thank you