[PHP] Domain Name Lookup Scripts

2004-05-18 Thread Ryan Schefke
Can anyone suggest any good (free) domain name lookup scripts written in
php?

 

Thanks,

Ryan



Re: [PHP] Domain Name Lookup Scripts

2004-05-18 Thread Robert Cummings
On Tue, 2004-05-18 at 11:09, Ryan Schefke wrote:
 Can anyone suggest any good (free) domain name lookup scripts written in
 php?

This is short, far from perfect, but I use it to look for availability
and you might be able to adapt it - it also checks for a verisign hit
which is usually that stupid thing they did a while back where NXDOMAINs
were overriden and returned as advertising spam:

#!/usr/bin/php -qC
?

if( !isset( $GLOBALS['argv'][1] ) )
{
echo 'Please supply a domain name!'.\n;
exit();  
}
 
$domain = trim( $GLOBALS['argv'][1] );

$extensions = array
(
'com',
'org',
'net',
'biz',
'ca ',
);

foreach( $extensions as $ext )
{
$cdomain = $domain.'.'.$ext;
$output = `host $cdomain`;  
  
if( eregi( '64\.94\.110\.11', $output )
|| 
eregi( 'NXDOMAIN', $output ) )
{ 
echo $cdomain.' -- free'.\n;
} 
else
{   
echo $cdomain.' -- taken'.\n;
}  
}

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Domain Name ?

2004-04-01 Thread Dave Carrera
Hi List,

I asked this a while back but have lost the replies :-(

$domain = http://www.foo.com;;

I want to strip our every thing and be left with only foo to use in my
function.

I think its multiple str_replace but have forgotten how to do it.

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.645 / Virus Database: 413 - Release Date: 28/03/2004
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Domain Name ?

2004-04-01 Thread Ralph Guzman
The easy way...

$domain = http://www.foo.com;;
$domain = explode('.', $domain);
$foo = $domain['1'];



-Original Message-
From: Dave Carrera [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 01, 2004 1:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Domain Name ?

Hi List,

I asked this a while back but have lost the replies :-(

$domain = http://www.foo.com;;

I want to strip our every thing and be left with only foo to use in my
function.

I think its multiple str_replace but have forgotten how to do it.

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.645 / Virus Database: 413 - Release Date: 28/03/2004
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Domain Name ?

2004-04-01 Thread Jason Wong
On Thursday 01 April 2004 17:29, Dave Carrera wrote:

 I asked this a while back but have lost the replies :-(

archives?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Bradley's Bromide:
If computers get too powerful, we can organize
them into a committee -- that will do them in.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Domain Name ?

2004-04-01 Thread Ryan A

On 4/1/2004 11:58:01 AM, Ralph Guzman ([EMAIL PROTECTED]) wrote:
 The easy way...

 $domain = http://www.foo.com;;
 $domain = explode('.', $domain);
 $foo = $domain['1'];



Yep, thats the easy and good solution, but be warned if a subdomain is used
or if www is not put
eg:
http://foo.com
you will get crappy results.

HTH

Cheers,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Domain Name ?

2004-04-01 Thread Red Wingate
How about RTFM ?

http://de2.php.net/parse_url

Ryan A wrote:
On 4/1/2004 11:58:01 AM, Ralph Guzman ([EMAIL PROTECTED]) wrote:

The easy way...

$domain = http://www.foo.com;;
$domain = explode('.', $domain);
$foo = $domain['1'];



Yep, thats the easy and good solution, but be warned if a subdomain is used
or if www is not put
eg:
http://foo.com
you will get crappy results.
HTH

Cheers,
-Ryan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Domain Name ?

2004-04-01 Thread Ryan A

On 4/1/2004 3:57:57 PM, [EMAIL PROTECTED] wrote:
 How about RTFM ?

 http://de2.php.net/parse_url

Was that RTFM for me? or for the guy who originally wrote or for the first
guy who replied?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Domain Name ?

2004-04-01 Thread John W. Holmes
From: Ryan A [EMAIL PROTECTED]
 On 4/1/2004 3:57:57 PM, [EMAIL PROTECTED] wrote:
  How about RTFM ?
 
  http://de2.php.net/parse_url

 Was that RTFM for me? or for the guy who originally wrote or for the first
 guy who replied?

It's always for you Ryan. Have you read your questions?!?!?

;)

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Domain Name ?

2004-04-01 Thread Ryan A

  On 4/1/2004 3:57:57 PM, [EMAIL PROTECTED] wrote:
   How about RTFM ?
  
   http://de2.php.net/parse_url
 
  Was that RTFM for me? or for the guy who originally wrote or for the
 first
  guy who replied?

 It's always for you Ryan. Have you read your questions?!?!?

 ;)

 ---John Holmes...

Hey John,
Thats the funny part, I guess you are pipeing in withoug seeing the original
post. If you look at the original post you will see that I *didn't* ask the
question.

The original question was posted by a dude who forgot something and was
answered by another dude, I just added to that answer and got this (rtfm)
reply cc'ed to me (original to the list) so was puzzled

Cheers,
-Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Domain Name ?

2004-04-01 Thread Red Wingate
This was going for the guy that started this thread :p

John W. Holmes wrote:
From: Ryan A [EMAIL PROTECTED]

On 4/1/2004 3:57:57 PM, [EMAIL PROTECTED] wrote:

How about RTFM ?

http://de2.php.net/parse_url
Was that RTFM for me? or for the guy who originally wrote or for the first
guy who replied?


It's always for you Ryan. Have you read your questions?!?!?

;)

---John Holmes...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Domain Name ?

2004-04-01 Thread Curt Zirzow
On Thu, 01 Apr 2004 15:57:57 +0200, Red Wingate [EMAIL PROTECTED] wrote:

How about RTFM ?

http://de2.php.net/parse_url
That doesnt solve anything.

perhaps you should RTFQ first

Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php