Can you add a whois lookup to your own website?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Can you add a whois lookup to your own website?

Post by simonmlewis »

We want to give our customers the chance to check if their domain is available, via our own site, rather than taking them away elsewhere.
Once they know, we can guide them to our favoured domain registrars.

I did find one called Speedy something, but it uses *.php, and we want to keep it within our own .inc template.

Any suggestions would be great.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Can you add a whois lookup to your own website?

Post by requinix »

simonmlewis wrote:I did find one called Speedy something, but it uses *.php, and we want to keep it within our own .inc template.
So what you're saying is that you have PHP code in one file and you wish it was in another file? What's the problem with copying it? Is there a license protecting the original? Then you'll either have to find a way to work Speedy into your system, or find another source.
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

Re: Can you add a whois lookup to your own website?

Post by simonmlewis »

I did try to put the code into a *.inc file but there were so many files attached to it, it seemed overkill anyway.

Hence why I wondered if there was a simpler way.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Can you add a whois lookup to your own website?

Post by requinix »

There is.

I don't know what you expect to happen here. Some solution is not going to magically present itself to you. Someone is not going to tell you "oh it's easy, just call this one function".
"Oh, but there are multiple files." Have you never worked with code that used two or more files?

You have code. Read it. Then adapt it into your site.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: Can you add a whois lookup to your own website?

Post by Celauran »

Is it this? If so, take a look at index.php, specifically lines 150 to 170. That's effectively all you need to incorporate into your existing codebase. You'll need to leave the directory structure in place since it doesn't use autoloading, but you can always call out to it from wherever you need to.
Post Reply