The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. September 16, 2019, 11:14:59 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: PHPWHOIS I only need one value....  (Read 2453 times)
LondonSEO
Rookie
**
Offline Offline

Posts: 15


View Profile
« on: December 06, 2007, 03:58:32 PM »

Hi,

I was using the phpwhois class from http://sourceforge.net/projects/phpwhois/ and I think is excelent, but I only need one field from the whole whois information...I only need the CREATED: date xxx any idea how can get that value ONLY, I would like to do some make some operations with that date so maybe the output should be an INT? let me know if you have any idea how can I do that?

sample:

Code:
Results for perkiset.org :

regrinfo->Array
 domain->Array
  name->perkiset.org
  created->2007-02-14  **********
  changed->2007-11-28
  expires->2011-02-14
  sponsor->GoDaddy.com, Inc. (R91-LROR)
  status->CLIENT UPDATE PROHIBITED
  nserver->Array
   ns43.domaincontrol.com->208.109.78.180
   ns44.domaincontrol.com->208.109.255.22
 owner->Array
  handle->GODA-034784379
  name->Registration Private
  address->Array
   address->Array
    0->DomainsByProxy.com
    1->15111 N. Hayden Rd., Ste 160, PMB 353
   city->Scottsdale
   state->Arizona
   pcode->85260
   country->US
  phone->+1.4806242599
  fax->+1.4806242599
  email->PERKISET.ORG@domainsbyproxy.com
 admin->Array
  handle->GODA-234784379
  name->Registration Private
  address->Array
   address->Array
    0->DomainsByProxy.com
    2->15111 N. Hayden Rd., Ste 160, PMB 353
   city->Scottsdale
   pcode->85260
   country->US
  phone->+1.4806242599
  fax->+1.4806242599
  email->PERKISET.ORG@domainsbyproxy.com

Thank you





Logged

No links in signatures please
nutballs
Administrator
Lifer
*****
Offline Offline

Posts: 5627


Back in my day we had 9 planets


View Profile
« Reply #1 on: December 06, 2007, 08:42:48 PM »

preg_match('#created->(\d{4}-\d{2}-\d{2})\#is',$thewhoisstring,$thematcharray);
echo $thematcharray[1]; //this prints just the captured date.


not even tested, but should work. If you blow up the universe though, its not my fault.
Logged

I could eat a bowl of Alphabet Soup and shit a better argument than that.
perkiset
Olde World Hacker
Administrator
Lifer
*****
Offline Offline

Posts: 10096



View Profile
« Reply #2 on: December 09, 2007, 03:37:31 PM »

I think the universe is safe. Looks good and that's exactly how I'd do it as well.

Although the subject of the query creeps me out a bit...  Don't make me...
Logged

It is now believed, that after having lived in one compound with 3 wives and never leaving the house for 5 years, Bin Laden called the U.S. Navy Seals himself.
vsloathe
vim ftw!
Global Moderator
Lifer
*****
Offline Offline

Posts: 1669



View Profile
« Reply #3 on: December 19, 2007, 11:27:23 AM »

On the Syndk8, I posted how to use the object that this class returns.
Logged

hai
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!