-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Major restructure for better standards.
- Loading branch information
1 parent
3d14a98
commit a8a577b
Showing
11 changed files
with
432 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,13 +11,19 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"require-dev": { | ||
"phpunit/phpunit": "^9.5" | ||
}, | ||
"require": { | ||
"php": ">=5.6", | ||
"ext-bcmath" : "*" | ||
"php": ">=7.2", | ||
"ext-bcmath": "*", | ||
"ext-curl": "*", | ||
"ext-gmp": "*", | ||
"ext-json": "*" | ||
}, | ||
"autoload": { | ||
"classmap": [ | ||
"class.IP2Proxy.php" | ||
] | ||
"psr-4": { | ||
"IP2Proxy\\": "src" | ||
} | ||
} | ||
} |
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
require 'vendor/autoload.php'; | ||
|
||
// Lookup by local BIN database | ||
$db = new \IP2Proxy\Database('vendor/ip2location/ip2proxy-php/data/PX10.SAMPLE.BIN', \IP2PROXY\Database::FILE_IO); | ||
|
||
echo 'Get All Fields' . PHP_EOL; | ||
$records = $db->lookup('1.0.0.8', \IP2PROXY\Database::ALL); | ||
print_r($records); | ||
|
||
echo PHP_EOL . PHP_EOL; | ||
|
||
echo 'Web Service' . PHP_EOL; | ||
|
||
// Lookup by Web API | ||
$ws = new \IP2Proxy\WebService('demo', 'PX10', false); | ||
|
||
$results = $ws->lookup('1.0.0.8'); | ||
print_r($results); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<phpunit bootstrap="tests/bootstrap.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="IP2Proxy PHP SDK Testcase"> | ||
<directory suffix="Test.php">./tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
Oops, something went wrong.