Re: php code to upload a url correctly
| From: | Jochem Maas | Date: | Fri, 26 Jan 2007 16:30:29 +0000 |
| Subject: | Re: php code to upload a url correctly | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247836@lists.php.net to get a copy of this message | ||
Dave Goodchild wrote:
> Wouldn't it have been less hassle to not send that comment when all I
> was doing was trying to help, am pressed for time, and copied and pasted
> my solution?
no hassle on my part. :-D
I doubt you want me to point out that you original
comment that I commented on and the reply thereof
you sent both constitute a greater waste of your time
(and less confusion on the part of the OP) than if you had
just removed the 'raw_param' from your original code snippet),
given that your so 'pressed for time' (which is, in essence, nothing more
than a state of mind).
"do or do not, there is no try" said the funnny, little green man.
>
> On 1/26/07, * Jochem Maas* <jochem@iamjochem.com
> <mailto:jochem@iamjochem.com>> wrote:
>
> 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?
>
> >
>
>
>
>
> --
> http://www.web-buddha.co.uk