Re: strings
| From: | Teodor Cimpoesu | Date: | Tue, 30 Jan 2001 09:16:29 +0000 |
| Subject: | Re: strings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37273@lists.php.net to get a copy of this message | ||
PeterOblivion@aol.com wrote:
>
> How can i make http://www.something.com/blah/blah.zip into
>
> blah/blah.zip
>
> http://www.somethingcom is a constant.. always the same thing
>
> how can i cut it out?
>
what comes to my mind right now is str_replace
('http://www.../','',$url)
where $url is the full URL.
oh, there is also parse_url() :)
so what you want would be:
$purl = parse_url ("http://.../blah.zip");
$whatiwant = $purl['path'];
-- teodor