Buy Sell Discuss UK Domain Names at AcornDomains.co.uk

Today's Drop Dates are: 07-11-2011 or 14-11-2011   All times are GMT. The time now is 09:11:17 PM.
Domain Name Sales Domain Software Calculate UK Domain Drop Dates Domain Registration NameDrive Domain Parking Subscribe to our Domains For Sale newsletter
Go Back   Domain Forum Acorn Domains Buy Sell Auction UK Domains > Domain Forum > New Domainers
Connect with Facebook

New Domainers If you are new to domaining or the UK domain market please post your questions here

Closed Thread
 
LinkBack Thread Tools Display Modes
Old 17-02-2010, 11:09:31 PM     #1 (permalink)

 
Join Date: Jan 2010
Posts: 233
buttontop is a jewel in the roughbuttontop is a jewel in the roughbuttontop is a jewel in the roughbuttontop is a jewel in the rough

php coding help

hi i am making a little script for myself to find domain renewal date, and wondered if anyone had and small cut and paste from a script they could give me that does just this.

Thanks
buttontop is offline  
Old 17-02-2010, 11:42:17 PM     #2 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,501
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

Deconstruction wrote a script that does bulk whois checks. Be aware you are limited to 1000 per day.

This Whois2 is also there, but I think its perl or something but converting it to php should be easy.

Purg also wrote one http://www.acorndomains.co.uk/domain...-download.html
__________________
Browse:
Skinner is offline  
Old 19-02-2010, 10:52:57 AM     #3 (permalink)

 
Join Date: Dec 2009
Location: London
Posts: 113
lwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud of
Classified Rating: 100% (1)

PHP Code for grabbing IPS TAG...easy switch to get Date

This is a part of a script that i wrote where you can dump in a list of domains or keywords (if it's keywords it'll remove spaces and switch it to .co.uk and .com) it'll then go fishing to see if it's been registered or not. This part of the script opens up a the uk nic page and grabs the IPS tag and updates the database.

Code:
<?php require_once('Connections/db_conn.php'); ?>
<?php
mysql_select_db($database_domains_conn, $domains_conn);
$query_getdomains = "SELECT * FROM domains WHERE  domains_id = ".$_GET['did']."";
$getdomains = mysql_query($query_getdomains, $domains_conn) or die(mysql_error());
$row_getdomains = mysql_fetch_assoc($getdomains);
$totalRows_getdomains = mysql_num_rows($getdomains);
?>
<?

do {
$domainTypeUK = preg_match("(.co.uk)", $row_getdomains['domains_domain']);
$domainsTypeOther = preg_match("(.com)", $row_getdomains['domains_domain']);
if ($domainTypeUK == 1) 

{
$file = file_get_contents("http://webwhois.nic.uk/cgi-bin/whois.cgi?query=".substr($row_getdomains['domains_domain'],11)."&WHOIS+Submit.x=0&WHOIS+Submit.y=0");
$desc = preg_match("[Tag = (.*)]", $file, $fulldesc);
$ipstag = $fulldesc[1];
$ipstag = str_replace(']', '', $ipstag);
$ipstag = str_replace('[', '', $ipstag);

//echo $fulldesc[1];

$UpdateSQL = "UPDATE domains SET domains_a = '$ipstag' WHERE domains_id = ".$row_getdomains['domains_id']."";

mysql_select_db($database_domains_conn, $domains_conn);
$Result1 = mysql_query($UpdateSQL, $domains_conn) or die(mysql_error());	

if($fulldesc[1] == "") {

echo $row_getdomains['domains_domain']." is avaialble!";

}else{

echo "Domain: ".$row_getdomains['domains_domain']." /n IPS Tag was: ".$row_getdomains['domains_a']." /n IPS Tag is now: ".$ipstag;		
}

}

else if ($domainsTypeOther == 1)

{

$file = file_get_contents("http://reports.internic.net/cgi/whois?whois_nic=".substr($row_getdomains['domains_domain'],11)."&type=domain");
$desc = preg_match("(Registrar:(.*\s))", $file, $fulldesc);

//echo $fulldesc[1];

$UpdateSQL = "UPDATE domains SET domains_a = '".$fulldesc[1]."' WHERE domains_id = ".$row_getdomains['domains_id']."";

mysql_select_db($database_domains_conn, $domains_conn);
$Result1 = mysql_query($UpdateSQL, $domains_conn) or die(mysql_error());	

if($fulldesc[1] == "") {

echo $row_getdomains['domains_domain']." is avaialble!";

}else{

echo "Domain: ".$row_getdomains['domains_domain']." Registrar was: ".$row_getdomains['domains_a']."  Registrar is now: ".$ipstag;		
}
			
}

} while ($row_getdomains = mysql_fetch_assoc($getdomains));		

// echo $domainsTypeOther;

?>
<?php
mysql_free_result($getdomains);
?>
You'd need to change the $desc = preg_match("[Tag = (.*)]", $file, $fulldesc); to look for the date.

Awesome tool for regular expressions lives at http://gskinner.com/RegExr/

Lee

Last edited by lwoody; 19-02-2010 at 11:10:16 AM. Reason: added a url
lwoody is offline  
Old 20-02-2010, 08:53:00 AM     #4 (permalink)

 
Join Date: Mar 2009
Location: Powys and Hemel Hempstead
Posts: 360
HariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond repute

To add to what Skinner said, remember there are daily limits and you will get blacklisted if you exceed them.

Quote:
The maximum query rate is 5 queries per second with a maximum of 1,000 queries per rolling 24 hours
HariSeldon is offline  
Old 20-02-2010, 01:23:31 PM     #5 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,501
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

Don't try blagging your IP either, albeit nom are kinda slow at detecting it, they do spot the patterns
__________________
Browse:
Skinner is offline  
Old 23-02-2010, 10:59:54 AM     #6 (permalink)

 
Join Date: Jan 2010
Posts: 233
buttontop is a jewel in the roughbuttontop is a jewel in the roughbuttontop is a jewel in the roughbuttontop is a jewel in the rough

is there a place that i can find out where i can find out how many queries i have left for any given time?
buttontop is offline  
Old 23-02-2010, 11:05:12 AM     #7 (permalink)

 
Join Date: Dec 2009
Location: London
Posts: 113
lwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud oflwoody has much to be proud of
Classified Rating: 100% (1)

counter

Im not sure if there is an official area within Nominet to monitor this but you could apply a counter to any of your PHP script to keep an eye on how many times you query it.

Lee
lwoody is offline  
Old 23-02-2010, 11:17:52 AM     #8 (permalink)

 
Join Date: Mar 2009
Location: Powys and Hemel Hempstead
Posts: 360
HariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond reputeHariSeldon has a reputation beyond repute

Quote:
Originally Posted by buttontop View Post
is there a place that i can find out where i can find out how many queries i have left for any given time?
No, for querying the Whois it is up to you to keep track so that you don't go over the limits.
HariSeldon is offline  
Old 23-02-2010, 01:46:15 PM     #9 (permalink)

 
Skinner's Avatar
 
Join Date: Jul 2008
Location: Manchester
Posts: 2,501
Skinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond reputeSkinner has a reputation beyond repute

If you go over the limit you get an display that says you have used your quota. If it happens alot you get blocked. I have been blocked before now, they blacklisted my whole ISP for about 3 months, so I had to use a proxy all the time.
__________________
Browse:
Skinner is offline  
Closed Thread



Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Domain Name Community Replies Last Post
PHP Coding - RAD nick279 Website Design 10 08-06-2009 11:29:26 PM
custom php coding needed grantw Website Design 3 30-07-2008 01:12:54 AM
PHP include in a Smarty Template admin Scripts and Coding 1 13-05-2008 06:37:26 AM

Domain Sponsor 2


All times are GMT. The time now is 09:11:17 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0 RC 2
All content on Acorn Domains is member generated and is not moderated before posting. All content is viewed and used by you at your own risk and AD does not warrant the accuracy or reliability of any of the information. The views expressed are those of the individual contributors and not necessarily those of AD. Please contact us to report any issues or send a PM to "Admin".