RE: [PHP] Eregi question
| From: | Dave Carrera | Date: | Thu, 11 Mar 2004 15:40:38 +0000 |
| Subject: | RE: [PHP] Eregi question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180172@lists.php.net to get a copy of this message | ||
Thanks da koenich,
Although $temp[0] gives me the domain name rather than the tld but thanks
very much for your help, I knew it was easy :-)
Yours Truly
Dave C
-----Original Message-----
From: Da Koenich [mailto:webmaster@interface-medien.de]
Sent: 11 March 2004 15:19
To: Dave Carrera
Cc: php-general@lists.php.net
Subject: Re: [PHP] Eregi question
hi dave,
try this:
$temp = explode('.',$_POST['variable']);
$domainname = $temp[1];
greetz
da koenich
> Hi List,
>
> I Know this is basic and I am sorry to bother the list with this
> question but I am confused, probably working to hard :-)
>
> I want to end up with a part of a string returned by $_POST to work
> with in my function.
>
> The string might be put into the text box like so, it’s a domain name
> checker,
>
> http://www.domainname.com
>
> I have already got rid of the http:// and www bits but I need
> to know
> how to get rid of the .com bit before proceeding with my check. So I
> will only be left with "domainname" for my function.
>
> I have looked at eregi, split, spliti but to no joy so any help would
> be gratefully received.
>
> Thank you in advance for any help
>
> Dave C
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.619 / Virus Database: 398 - Release Date: 10/03/2004
>
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.619 / Virus Database: 398 - Release Date: 10/03/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.619 / Virus Database: 398 - Release Date: 10/03/2004