Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,681 members, 7,809,576 topics. Date: Friday, 26 April 2024 at 11:31 AM

Help To Integrate Whois Domain Details To Website - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Help To Integrate Whois Domain Details To Website (1305 Views)

How To Integrate Online Payment In My Website / Help To Integrate Whois Domain Details To Website / How Can I integrate as sms system to my website. any help? (2) (3) (4)

(1) (Reply) (Go Down)

Help To Integrate Whois Domain Details To Website by frisahost(m): 8:04am On Feb 09, 2012
Hi,

can i know is their any php script r methods to add domain details to my website.

I mean when user wants to know the details about a particular domain they will type in a text box, so that we need to provide the details like in whois server.
Re: Help To Integrate Whois Domain Details To Website by delomos(m): 10:10am On Feb 09, 2012
You can read this :http://en.wikipedia.org/wiki/WHOIS

You can use php `whois` to call native whois if your host is on a unix type machine then formatting your output accordingly.
Re: Help To Integrate Whois Domain Details To Website by frisahost(m): 8:44pm On Feb 09, 2012
Can u explain more beta pls
Re: Help To Integrate Whois Domain Details To Website by delomos(m): 9:42pm On Feb 09, 2012
"whois" is a native tool installed on most Linux/Unix servers, and it is very easy to use from within a PHP script. An example:

$hostname_to_lookup = "nairaland.com" // of course this wil be a dynamic variable from your users

$output = shell_exec("whois $site"wink;

echo $output; // see attachment of my output when I run this.

And of course, you can do interesting things with the output you get. Very important though, be very sure you're checking the input your users are giving you, "shell_exec" is very power and can be exploited, from the top of my head, I will check it like so (I didn't test this code, so you do the work, our experimenting):

if(!preg_match(/http:\/\/[a-z]+.[com|edu|net]$/, $_POST['user_url']) ) {
die("Sir, abeg enter correct URL"wink;
}else {
$user_url = $_POST['user_url']; // or $_GET['user_url'];
}

$hostname_to_lookup = trim($user_url); // clean up the output

$output = shell_exec("whois $site"wink;

echo $output;

Re: Help To Integrate Whois Domain Details To Website by Fayimora(m): 10:10pm On Feb 09, 2012
moving. . . .
Re: Help To Integrate Whois Domain Details To Website by Fayimora(m): 10:23pm On Feb 09, 2012
Moderators could you please lock this topic? I moved it here and then I realised the OP posted in both sections.

@OP refrain from such an act. Its pointless!

(1) (Reply)

How Much Is Least Expected To Design A Hotel Website / Nigeria Weather App - Redesigned (opinion) / Who Have Content.ad Account For Sale

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.