| Recommend this page to a friend! |
| Info | Example | Demos | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2025-10-20 (17 hours ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked | |||||
| Version | License | PHP version | Categories | |||
| network_tools 1.0 | MIT/X Consortium ... | 5.4 | Networking, PHP 5, Tools, Web services |
| Description | Author | |
This package can perform diagnostics of access to Internet services. |
Usage examples - Complete function overview:
$tools = new NetworkTools();
System check
$tools->selftest(); // Shows HTML report and exits with die()`
DNS Functions (require domain names)
$mxResult = $tools->mx('google.com'); // MX records
$aResult = $tools->a('google.com'); // A record (IP)
$txtResult = $tools->txt('google.com'); // TXT records
$cnameResult = $tools->cname('www.google.com'); // CNAME record
$soaResult = $tools->soa('google.com'); // SOA record
$spfResult = $tools->spf('google.com'); // SPF records
Reverse DNS (requires IP address)
$ptrResult = $tools->ptr('8.8.8.8'); // PTR record
Connection Tests (domain/IP + optional port)
$tcpResult = $tools->tcp('google.com', 80, 10); // TCP port test
$smtpResult = $tools->smtp('smtp.gmail.com', 25, 10); // SMTP test
$httpResult = $tools->http('https://google.com', 10); // HTTP test
$httpsResult = $tools->https('google.com', 10); // HTTPS test
Information Services (require domain)
$whoisResult = $tools->whois('google.com', 10); // WHOIS lookup
Network Tools (domain or IP) - with method indication
$pingResult = $tools->ping('8.8.8.8', 4); // Ping (real or fake)
$traceResult = $tools->trace('google.com', 20); // Traceroute (real or fake)
Manual fallback functions
$fakePingResult = $tools->fakeping('google.com', 4); // Force TCP ping
$fakeTraceResult = $tools->faketrace('google.com', 15); // Force TCP traceroute
Universal lookup (auto-detects input type)
$autoResult1 = $tools->lookup('192.168.1.1'); // Auto PTR
$autoResult2 = $tools->lookup('google.com'); // Auto A record
$autoResult3 = $tools->lookup('[email protected]'); // Auto MX
Print example results
print_r($mxResult);
print_r($pingResult); // Contains ['method' => 'real_ping' or 'fake_ping']
print_r($traceResult); // Contains ['method' => 'real_traceroute' or 'fake_traceroute']
print_r($httpResult);
<?php
|
| File | Role | Description |
|---|---|---|
| Example | Function examples | |
| Class | Class with examples | |
| Example | Selftest Example |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | |||||||
| 0% |
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.