Skip to content
Browse files

* Improving the output of the test file.

git-svn-id: http://svn.php.net/repository/pear/packages/Net_Portscan/trunk@124263 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent 3d78302 commit 3eb2ec4725cb06c89a895c5e28e1f9c059873fe9 @mj mj committed Apr 22, 2003
Showing with 4 additions and 4 deletions.
  1. +4 −4 tests/01-portscan.php
View
8 tests/01-portscan.php
@@ -1,6 +1,6 @@
<?php
/** $Id$ */
-require_once "Net_Portscan/Portscan.php";
+require_once "Net/Portscan.php";
/** Test for checkPort() and getService() */
if (Net_Portscan::checkPort("localhost", 80) == NET_PORTSCAN_SERVICE_FOUND) {
@@ -12,14 +12,14 @@
$result = Net_Portscan::checkPortRange("localhost", 70, 90);
foreach ($result as $port => $element) {
+ echo "Port " . $port . ": ";
if ($element == NET_PORTSCAN_SERVICE_FOUND) {
- echo "On port " . $port . " there is running a service.\n";
+ echo " Service found.\n";
} else {
- echo "On port " . $port . " there is no service running.\n";
+ echo " No service found.\n";
}
}
-
/** Test for getService() */
echo "On port 22, there service " . Net_Portscan::getService(22) . " is running.\n";

0 comments on commit 3eb2ec4

Please sign in to comment.
Something went wrong with that request. Please try again.