Jump to content


retrieving client side information using php

  • Please log in to reply
3 replies to this topic

#1 oracle259

  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 17 October 2006 - 06:07 PM

Hey do you guys know of any way that i can retrieve the computer name of a computer on a domain using php or a combination of php and javascript.

say eg that the name given to my computer by the MIS dept is OSP1 on domain NETDOMAIN how can i retrieve the OSP1 computer name using php or php + javascript

#2 Ninjakreborn

  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 17 October 2006 - 06:39 PM

You could probably have a bot hit the who-is database and do a search for it, and see what you can find, and then extract that piece of data.  However the who-is might not allow that, so you might want to check there terms of service, or be careful or they could block your ip.


Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.

#3 oracle259

  • Members
  • PipPipPip
  • Advanced Member
  • 119 posts

Posted 17 October 2006 - 08:06 PM

how do i go about doing that? Help

#4 Barand

  • Moderators
  • Sen . ( ile || sei )
  • 18,041 posts

Posted 17 October 2006 - 10:40 PM

I can't test this until I get into the office tomorrow and back on the network but perhaps

$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
echo $hostname;

If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received


|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users