Re: php code to upload a url correctly
| From: | Dave Goodchild | Date: | Fri, 26 Jan 2007 15:42:43 +0000 |
| Subject: | Re: php code to upload a url correctly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247825@lists.php.net to get a copy of this message | ||
This is what I use:
$site = (!preg_match('#^http://#', $_POST['c_site'])) ?
raw_param(trim(strip_tags("http:\/\/" . $_POST['c_site']))) :
raw_param(trim(strip_tags($_POST['c_site'])));
don't worry about raw_param, that's a function of my own, but you get the
idea.