Re: checking url
| From: | Subodh Gupta | Date: | Wed, 25 Apr 2001 04:23:50 +0000 |
| Subject: | Re: checking url | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50277@lists.php.net to get a copy of this message | ||
Hi Dmitry,
In case you want a regular expression to check if it is a valid url you can try this...
$url = "yoururl";
if(empty($url) && !eregi("^http://[A-Za-z0-9\%\?\_\:\~\/\.-]+$,$url))
$errmsg="$url doesn't look like a valid URL\n";
I hope this helps.
Subodh Gupta
I have learned, Joy is not in things, it is in us.
You will ultimately be known by what you give and not what you get.
----- Original Message -----
From: "Dmitry" <dmi_k@nekto.ru>
To: <php-general@lists.php.net>
Sent: Wednesday, April 25, 2001 2:14 AM
Subject: [PHP] checking url
Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return.
Dmitry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net