Skip to content

Commit

Permalink
Whitespace & Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
W1zzardTPU committed Nov 1, 2017
1 parent e2a2064 commit 2960a6b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
22 changes: 12 additions & 10 deletions upload/library/TPUDetectSpamReg/AS.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ static function isIPv6($ip)

static function getASNameAndNumber_cymru($ip, &$asNumber, &$asName)
{
if (empty($ip)) return false;
if (empty($ip))
return false;

$dns = null;
try
{
Expand Down Expand Up @@ -82,16 +84,16 @@ static function getASNameAndNumber_moocherio($ip, &$asNumber, &$asName)
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'http://api.moocher.io/as/ip/'.$ip,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 1,
CURLOPT_TIMEOUT => 1,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
CURLOPT_URL => 'http://api.moocher.io/as/ip/'.$ip,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 1,
CURLOPT_TIMEOUT => 1,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'content-type: application/json'
),
),
));

$response = curl_exec($curl);
Expand Down
4 changes: 3 additions & 1 deletion upload/library/TPUDetectSpamReg/IPCountry.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ class TPUDetectSpamReg_IPCountry
{
static function getIPCountry($ip)
{
if (empty($ip)) return 'XX';
if (empty($ip))
return 'XX';

if (function_exists('geoip_db_avail') && geoip_db_avail(GEOIP_COUNTRY_EDITION))
{
try
Expand Down

0 comments on commit 2960a6b

Please sign in to comment.