Re: php code to upload a url correctly

From: Date: Fri, 26 Jan 2007 15:49:35 +0000
Subject: Re: php code to upload a url correctly
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-247828@lists.php.net to get a copy of this message
Dave Goodchild wrote: > 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']))); this is much better: http://php.net/parse_url > > don't worry about raw_param, that's a function of my own, but you get the > idea. wouldn't it have been less hassle to delete the raw_param() call than to try and explain it's existence? >

« previous php.general (#247828) next »