SQL bug fixed, now working correctly!

This commit is contained in:
mykola2312 2022-03-16 17:37:16 +02:00
parent ea352a640a
commit e075c52488
3 changed files with 4 additions and 4 deletions

View file

@ -35,7 +35,7 @@ function get_external_ip()
$result = curl_exec($ch);
curl_close($ch);
if (result == false) {
if ($result == false) {
throw new Exception("request to ident.me failed");
} else if (inet_pton($result) == false) {
throw new Exception("ident.me respond invalid ip");

View file

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Mar 16, 2022 at 01:15 PM
-- Generation Time: Mar 16, 2022 at 03:35 PM
-- Server version: 10.7.3-MariaDB
-- PHP Version: 7.4.28
@ -30,7 +30,7 @@ SET time_zone = "+00:00";
CREATE TABLE `tracker` (
`info_hash` char(40) COLLATE utf8mb4_unicode_ci NOT NULL,
`ip` varchar(40) COLLATE utf8mb4_unicode_ci NOT NULL,
`port` smallint(5) NOT NULL,
`port` smallint(5) UNSIGNED NOT NULL,
`update_time` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;