diff --git a/api/composer.json b/api/composer.json deleted file mode 100644 index 5aaf397..0000000 --- a/api/composer.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "autoload": { - "psr-0": { - "SquidApp": "src" - } - } -} diff --git a/api/src/SquidApp/Database.php b/api/src/SquidApp/Database.php deleted file mode 100644 index 892bc8e..0000000 --- a/api/src/SquidApp/Database.php +++ /dev/null @@ -1,26 +0,0 @@ -conn = null; - - try{ - $this->conn = new \PDO("mysql:host=" . $this->host . ";dbname=" . $this->db_name, $this->username, $this->password); - }catch(PDOException $exception){ - echo "Connection error: " . $exception->getMessage(); - } - - return $this->conn; - } -} diff --git a/api/src/SquidApp/Ipaddr.php b/api/src/SquidApp/Ipaddr.php deleted file mode 100644 index 849cdac..0000000 --- a/api/src/SquidApp/Ipaddr.php +++ /dev/null @@ -1,29 +0,0 @@ -address = $address; - } - - public function setAddress($ip) { - - if (!filter_var($ip, FILTER_VALIDATE_IP) === false) { - $this->address = $ip; - } else { - throw new Exception($ip . ' ' . 'is not a valid IP address'); - } - - } - - public function getAddress() { - - return $this->address; - } - -} diff --git a/api/src/SquidApp/Port.php b/api/src/SquidApp/Port.php deleted file mode 100644 index 817493d..0000000 --- a/api/src/SquidApp/Port.php +++ /dev/null @@ -1,31 +0,0 @@ -port = $port; - } - - public function checkPort($port) { - - if(isset($port)) { - $this->port = $port; - } else { - throw new Exception($port . ' ' . 'not found'); - } - } - - public function getPort() { - - return $this->port; - } -} \ No newline at end of file diff --git a/api/src/SquidApp/Services.php b/api/src/SquidApp/Services.php deleted file mode 100644 index 11088bf..0000000 --- a/api/src/SquidApp/Services.php +++ /dev/null @@ -1,31 +0,0 @@ -service = $service; - } - - public function detectService($service) { - - $services = array(80 => 'http', 21 => 'ftp', 22 => 'ssh'); - $port = array_search($service, $services); - - if($port !== NULL) { - $this->service = $port; - } - } - - public function getServiceName() { - return $this->service; - } -} diff --git a/api/src/bin/checkip.php b/api/src/bin/checkip.php deleted file mode 100644 index 0c41fef..0000000 --- a/api/src/bin/checkip.php +++ /dev/null @@ -1,18 +0,0 @@ -setAddress($ip); -print_r($ipaddr->getAddress() . PHP_EOL); - diff --git a/api/src/bin/checkport.php b/api/src/bin/checkport.php deleted file mode 100644 index de1ad06..0000000 --- a/api/src/bin/checkport.php +++ /dev/null @@ -1,17 +0,0 @@ -checkPort($portnum); -print_r($port->getPort() . PHP_EOL);