note 8258 deleted from function.ereg by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:21:22 +0000 |
| Subject: | note 8258 deleted from function.ereg by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20119@lists.php.net to get a copy of this message | ||
FWIW - I allow users to post URLs right on the site. However, sometimes they want the HTTP://
business. Sometimes not. Here's a little function I find handy:
function stripHTTP($url)
{
if (eregi('(^http[s]*:[/]+)(.*)', $url, $x))
return $x[2];
return $url;
}