| phpwhois_functions.php | |
| Description | This file holds all extended functions which belongs to WhoIs handling. |
| Introduction | |
| Usage of phpwhois | You have to include (per require_once() ) this file to use the WhoIs-Functions. |
| Quick and Dirty way of usage | to generate a clickable link which will open a popup-window use this |
| Example WhoIs-Query | A typically WhoIs-Query may look like this |
| Functions | |
| GeoIP-Functions for phpwhois | |
| WHOIS_LOADED | The Constant WHOIS_LOADED will be defined when phpwhois_functions.php was loaded successfully. |
| geoip_whois_link | Create a clickable link for a WhoIs-Query. |
| Usage of phpwhois | You have to include (per require_once() ) this file to use the WhoIs-Functions. |
| Quick and Dirty way of usage | to generate a clickable link which will open a popup-window use this |
| Example WhoIs-Query | A typically WhoIs-Query may look like this |
to generate a clickable link which will open a popup-window use this
if(file_exists(WB_PATH.'/modules/geoip/phpwhois_functions.php')) {
require_once(WB_PATH.'/modules/geoip/phpwhois_functions.php');
}
...
if(defined('WHOIS_LOADED')) {
$whois_link = geoip_whois_link($ip_addr);
echo $whois_link;
}But since phpwhois is part of GeoIP-Module, there is no need to check against WHOIS_LOADED if GeoIP is required. In that case you may use this
require_once(WB_PATH.'/modules/geoip/phpwhois_functions.php'); ... $whois_link = geoip_whois_link($ip_addr); echo $whois_link;
The output may look like this
<a href="http://www.example.org/modules/geoip/phpwhois_popup.php?IP=200.10.40.1" onclick="return geoip_popup(this.href);" title="WhoIsQuery" target="_blank">200.10.40.1</a>
A typically WhoIs-Query may look like this
% This is the RIPE Whois query server #3. % The objects are in RPSL format. % % Rights restricted by copyright. % See http://www.ripe.net/db/copyright.html % Note: This output has been filtered. % To receive output for a database update, use the "-B" flag. % Information related to '217.0.0.0 - 217.5.127.255' inetnum: 217.0.0.0 - 217.5.127.255 netname: DTAG-DIAL13 descr: Deutsche Telekom AG country: DE admin-c: DTIP tech-c: DTST status: ASSIGNED PA remarks: ****************************************************************** remarks: * Abuse Contact: http://www.t-com.de/ip-abuse in case of Spam, * remarks: * Hack Attacks, Illegal Activity, Violation, Scans, Probes, etc. * remarks: ****************************************************************** mnt-by: DTAG-NIC source: RIPE # Filtered person: DTAG Global IP-Addressing address: Deutsche Telekom AG address: D-90492 Nuernberg address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: ripe.dtip@telekom.de nic-hdl: DTIP mnt-by: DTAG-NIC source: RIPE # Filtered person: Security Team address: Deutsche Telekom AG address: Germany phone: +49 180 5334332 fax-no: +49 180 5334252 e-mail: abuse@t-ipnet.de nic-hdl: DTST mnt-by: DTAG-NIC source: RIPE # Filtered % Information related to '217.0.0.0/13AS3320' route: 217.0.0.0/13 descr: Deutsche Telekom AG, Internet service provider origin: AS3320 member-of: AS3320:RS-PA-TELEKOM mnt-by: DTAG-RR source: RIPE # Filtered
| GeoIP-Functions for phpwhois | |
| WHOIS_LOADED | The Constant WHOIS_LOADED will be defined when phpwhois_functions.php was loaded successfully. |
| geoip_whois_link | Create a clickable link for a WhoIs-Query. |
Create a clickable link for a WhoIs-Query.
function geoip_whois_link( $ip_addr )