3v4l.org

run code in 300+ PHP versions simultaneously
<? // Phil Blackman <phil.blackman@tmnplc.com> 2009 // feed.php // arse over tit script for dealing with PureLead data $start_time = date("c"); set_time_limit(180000); //include("/home/phil/uploads/database.php"); // Connect to the Database //$con_ptr = mysql_connect('db-02-03.tmnplc.com:3306','campaigns_web','pH4q.fQB23!'); //$con_ptr = connect_sym_live(); //$con_ptr = connect_sbm(); // Connect to the Database $con_ptr = mysql_connect("db-08-02.tmnplc.com", "keila_web","Zircon500"); //$con_ptr = mysql_connect("db-08-01.tmnplc.com", "mailman","6Zyj8xj7"); // database //$db = "mailman"; // testing $db = "surveycentral"; // live // telephone validation stuff $phone_db = "surveycentral"; // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE); $user_tbl = $db.".Users"; $mobile_tbl = $db.".MobileData"; $landline_tbl = $db.".LandLineData"; // data8 login details $d8username = "tmngroup_data8"; $d8password = "AxUcmOkj12"; if($_POST) { foreach($_POST as $key => $value) { // for form debugging //echo $key." --- ".$value."<br>"; $$key = $value; } } if($_GET) { foreach($_GET as $key => $value) { // for form debugging //echo $key." --- ".$value."<br>"; $$key = $value; } } error_reporting(E_ALL); $logdir = "/var/www/purelead/log_files/external_feed_log/"; $time = date("c"); function blacklist($ip, $time = '') { global $con_ptr, $ip_blacklist_table; if(!empty($time)) { $update = "UPDATE ".$ip_blacklist_table." SET active = 0 WHERE ip = '".$ip."' AND ts < '".$time."'"; //echo $update; die; if(mysql_query($update)){ return true; } } // check to see if the IP exists $sql = "SELECT * FROM ".$ip_blacklist_table." WHERE ip = '".$ip."'"; $res = mysql_query($sql, $con_ptr); $num_rows = mysql_num_rows($res); if($num_rows == 1){ $update = "UPDATE ".$ip_blacklist_table." SET active = 1, ts = '".date("c")."' WHERE ip = '".$ip."'"; mysql_query($update); return true; } else { $insert = "INSERT INTO ".$ip_blacklist_table." (ip) VALUES ('".$ip."')"; mysql_query($insert); return true; } } function checkIP($ip) { global $con_ptr, $UsersTbl, $ip_blacklist_table; // first remove the entries from the blacklist $fiveminsago = date("c", mktime(date("H"), date("i")-5, date("s"), date("m") , date("d"), date("Y"))); blacklist($ip, $fiveminsago); // then check to see if we've had a reg from the same IP $sql = "SELECT * FROM ".$UsersTbl." WHERE ip = '".$ip."' ORDER BY time DESC"; //echo $sql; die; $res = mysql_query($sql, $con_ptr); $num_rows = mysql_num_rows($res); if($num_rows > 1) { $row = mysql_fetch_array($res); $reg_timestamp = strtotime($row['time']); $timestamp_now = time(); $difference = $timestamp_now - $reg_timestamp; if($difference < 60) { blacklist($ip); return false; } else { // now check they aren't in the blacklist table $sql = "SELECT * FROM ".$ip_blacklist_table." WHERE ip = '".$ip."' AND active = 1"; $res = mysql_query($sql, $con_ptr); $num_rows = mysql_num_rows($res); if($num_rows == 1){ blacklist($ip); return false; } else { return true; } } } else { return true; } } // data8 bits function LineIsValid($telephone, $d8username, $d8password) { global $landline_tbl, $phone_ptr; // first we check to see if we've already searched for this number in the 3 months so we don't cane our credits $three_months_ago = date("Y-m-d H:i:s", mktime(date("H"), date("i"), date("s"), date("m")-3, date("d"), date("Y"))); $sql = "SELECT * FROM ".$landline_tbl." WHERE Number = '".$telephone."' AND dos > '".$three_months_ago."'"; //echo "sasf".$d8username.$d8password; $res = mysql_query($sql, $phone_ptr); $numrows = mysql_num_rows($res); if($numrows > 0) { $row = mysql_fetch_array($res); if($row['Result'] != 'Invalid') { return true; } else { return false; } } $params = array( "username" => $d8username, "password" => $d8password, "number" => $telephone ); //$client = new SoapClient("http://webservices.data-8.co.uk/TelephoneValidation.asmx?WSDL"); $client = new SoapClient("http://webservices.data-8.co.uk/TelephoneLineValidation.asmx?WSDL"); $result = $client->IsValidAdvanced($params); //echo $number."\n"; //var_dump($result); //echo "\n"; $data = iterateObject($result); $sql = "INSERT INTO ".$landline_tbl." VALUES ('', '".$telephone."', '".$data['Success']."', '".$data['CreditsRemaining']."', '".$data['Result']."', NOW())"; //echo $sql; mysql_query($sql, $phone_ptr); logResults($result, date("c"), "LandLineCheck.log", $telephone); if ($result->IsValidAdvancedResult->Result != "Valid") { return false; } else { return true; } } function MobileIsValid($telephone, $d8username, $d8password) { global $mobile_tbl, $phone_ptr; // first we check to see if we've already searched for this number in the 3 months so we don't cane our credits $three_months_ago = date("Y-m-d H:i:s", mktime(date("H"), date("i"), date("s"), date("m")-3, date("d"), date("Y"))); $sql = "SELECT * FROM ".$mobile_tbl." WHERE Number = '".$telephone."' AND dos > '".$three_months_ago."'"; //echo $sql; $res = mysql_query($sql, $phone_ptr); $numrows = mysql_num_rows($res); if($numrows > 0) { $row = mysql_fetch_array($res); if($row['Result'] != 'Invalid') { return true; } else { return false; } } $params = array( "username" => $d8username, "password" => $d8password, "number" => $telephone ); $client = new SoapClient("http://webservices.data-8.co.uk/MobileValidation.asmx?WSDL"); if($numrows == 0) { $result = $client->IsValid($params); } logResults($result, date("c"), "MobileCheck.log", $telephone); // insert into the mobile table $data = iterateObject($result); $sql = "INSERT INTO ".$mobile_tbl." VALUES ('', '".$telephone."', '".$data['Success']."', '".$data['CreditsRemaining']."', '".$data['Result']."', '".$data['CountryISO']."', '".$data['Organisation']."', '".$data['NetworkName']."', '".$data['NetworkType']."', '".$data['Ported']."', '".$data['PortedFromOrganisation']."', '".$data['PortedFromNetwork']."', '".$data['LocationISO']."', NOW())"; //echo $sql; mysql_query($sql, $phone_ptr); //print_r($result); if ($result->IsValidResult->Result != "Success") { return false; } else { return true; } } // function for checking if the number is on TPS function IsCallable($telephone, $d8username, $d8password) { $params = array( "username" => $d8username, "password" => $d8password, "number" => $telephone ); $client = new SoapClient("http://webservices.data-8.co.uk/TPS.asmx?WSDL"); $result = $client->IsCallable($params); //var_dump($result); if ($result->IsCallableResult->Status->Success == 0) { //echo "Error: " . $result->IsCallableResult->Status->ErrorMessage; // didn't get a response so we'll assume it's callable - we'll validate it anyway return true; } else { // Results can be extracted from the following fields: if($result->IsCallableResult->Callable == false) { return false; } else { // then it's callable return true; } } } // function for validating the phone number with our 3rd party supplier function validateTelephoneNumber($telephone) { global $d8username, $d8password; // first do the freebie check if(telephoneNumber($telephone) == false) { return false; } else { // now do the data8 check $match = "/^07[0-9]{9,10}/"; if(preg_match($match, $telephone)) { // then it's a mobile if(MobileIsValid($telephone, $d8username, $d8password) != true) { return false; } } else { // then it's a landline if(LineIsValid($telephone, $d8username, $d8password) != true) { return false; } } // if we get to here than we can assume it's valid return true; } } // todays date $today = date("Ymd"); // Call the getAge function if (isset($_POST['birth_date'])) { $age = getAge($birth_date); } //Or fail else echo'false - no dob provided'; { } function getAge($birth_date){ list($year, $month, $day) = explode("-", $birth_date); $year_diff = date("Y") - $year; $month_diff = date("m") - $month; $day_diff = date("d") - $day; if ($day_diff < 0) { $month_diff--; } if ($month_diff < 0) { $year_diff--; } return $year_diff; } // logs the reuslts function logResults($values, $logfile){ global $logdir, $time; // count the values $num_vals = count($values); // open the log file $resfile = fopen($logdir.$logfile, "a"); //write data to the log file foreach($values as $key => $value){ $value = str_replace("'", "", $value); $value = trim($value, "\n\r"); $value = ereg_replace("\r", " ", $value); $value = ereg_replace("\n", " ", $value); fwrite($resfile, $key." --> ".$value); fwrite($resfile, ","); } fwrite($resfile, $time); fwrite($resfile, "\n"); // close the log file fclose($resfile); } LineIsValid(($_POST['telephone']), $d8username, $d8password); MobileIsValid(($_POST['telephone']), $d8username, $d8password); IsCallable(($_POST['telephone']), $d8username, $d8password); validateTelephoneNumber(($_POST['telephone'])); $curl = curl_init(); if ( !$curl ) { print "Failed to initalise cURL object\n"; } else { $url = "https://v3.lolagrove.com/data.ashx?id=7941.1674&paid_creditors_six_months=Yes&email=".urlencode($email)."&firstname=".urlencode($firstname)."&lastname=".($lastname)."&address1=".urlencode($address1)."&towncity=".urlencode($towncity)."&postcode=".urlencode($postcode)."&telephone=".urlencode($telephone)."&age=".urlencode($age)."&debt_amount=".urlencode($debt_amount)."&debt_with=".urlencode($debt_with)."&disposable_income=".urlencode($disposable_income)."&iva_bankruptcy=".urlencode($iva_bankruptcy)."&securekey=6e5af886-22e5-4f04-b97b-946539aa70f1"; $curl_opts = array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_SSL_VERIFYHOST => true, CURLOPT_FOLLOWLOCATION => true, CURLOPT_FAILONERROR => true, ); if ( !curl_setopt_array( $curl, $curl_opts ) ) { print "Unable to set properties on CURL object\n"; } else { $response = curl_exec( $curl ); $responseCode = curl_getinfo( $curl, CURLINFO_HTTP_CODE ); if ( is_bool( $response ) && $response == false ) { // Failed to make HTTP request to tracking URL echo 'Error from CURL in livefeed: "', curl_error( $curl ), '" ', var_export( curl_getinfo( $curl ), TRUE ); } else if ( ! ( $responseCode >= 200 && $responseCode <= 299 ) ) { // We got an HTTP response, but it was not successful print "Error: Tracking URL returned HTTP $responseCode\n"; } else { // All good print "Success, response was:\n"; echo var_export( $response ), "\n"; } } } curl_close( $curl ); // log the values $values[] = $response; $values[] = $responseCode; $values[] = $url; logResults($values, 'Madison_financial');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 36
Branch analysis from position: 28
2 jumps found. (Code = 77) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
2 jumps found. (Code = 78) Position 1 = 31, Position 2 = 35
Branch analysis from position: 31
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
Branch analysis from position: 35
2 jumps found. (Code = 43) Position 1 = 38, Position 2 = 46
Branch analysis from position: 38
2 jumps found. (Code = 77) Position 1 = 40, Position 2 = 45
Branch analysis from position: 40
2 jumps found. (Code = 78) Position 1 = 41, Position 2 = 45
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
Branch analysis from position: 45
2 jumps found. (Code = 43) Position 1 = 61, Position 2 = 66
Branch analysis from position: 61
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
2 jumps found. (Code = 43) Position 1 = 98, Position 2 = 100
Branch analysis from position: 98
1 jumps found. (Code = 42) Position 1 = 226
Branch analysis from position: 226
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
2 jumps found. (Code = 43) Position 1 = 177, Position 2 = 179
Branch analysis from position: 177
1 jumps found. (Code = 42) Position 1 = 226
Branch analysis from position: 226
Branch analysis from position: 179
2 jumps found. (Code = 46) Position 1 = 191, Position 2 = 193
Branch analysis from position: 191
2 jumps found. (Code = 43) Position 1 = 194, Position 2 = 209
Branch analysis from position: 194
1 jumps found. (Code = 42) Position 1 = 226
Branch analysis from position: 226
Branch analysis from position: 209
2 jumps found. (Code = 46) Position 1 = 211, Position 2 = 213
Branch analysis from position: 211
2 jumps found. (Code = 43) Position 1 = 215, Position 2 = 220
Branch analysis from position: 215
1 jumps found. (Code = 42) Position 1 = 226
Branch analysis from position: 226
Branch analysis from position: 220
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 213
Branch analysis from position: 193
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 98, Position 2 = 100
Branch analysis from position: 98
Branch analysis from position: 100
Branch analysis from position: 45
Branch analysis from position: 46
Branch analysis from position: 35
Branch analysis from position: 36
filename:       /in/Ynbon
function name:  (null)
number of ops:  240
compiled vars:  !0 = $start_time, !1 = $con_ptr, !2 = $db, !3 = $phone_db, !4 = $user_tbl, !5 = $mobile_tbl, !6 = $landline_tbl, !7 = $d8username, !8 = $d8password, !9 = $value, !10 = $key, !11 = $logdir, !12 = $time, !13 = $today, !14 = $age, !15 = $birth_date, !16 = $curl, !17 = $url, !18 = $email, !19 = $firstname, !20 = $lastname, !21 = $address1, !22 = $towncity, !23 = $postcode, !24 = $telephone, !25 = $debt_amount, !26 = $debt_with, !27 = $disposable_income, !28 = $iva_bankruptcy, !29 = $curl_opts, !30 = $response, !31 = $responseCode, !32 = $values
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'c'
          2        DO_ICALL                                         $33     
          3        ASSIGN                                                   !0, $33
    6     4        INIT_FCALL                                               'set_time_limit'
          5        SEND_VAL                                                 180000
          6        DO_ICALL                                                 
   13     7        INIT_FCALL_BY_NAME                                       'mysql_connect'
          8        SEND_VAL_EX                                              'db-08-02.tmnplc.com'
          9        SEND_VAL_EX                                              'keila_web'
         10        SEND_VAL_EX                                              'Zircon500'
         11        DO_FCALL                                      0  $36     
         12        ASSIGN                                                   !1, $36
   17    13        ASSIGN                                                   !2, 'surveycentral'
   20    14        ASSIGN                                                   !3, 'surveycentral'
   23    15        INIT_FCALL                                               'error_reporting'
         16        SEND_VAL                                                 7
         17        DO_ICALL                                                 
   25    18        CONCAT                                           ~41     !2, '.Users'
         19        ASSIGN                                                   !4, ~41
   26    20        CONCAT                                           ~43     !2, '.MobileData'
         21        ASSIGN                                                   !5, ~43
   27    22        CONCAT                                           ~45     !2, '.LandLineData'
         23        ASSIGN                                                   !6, ~45
   30    24        ASSIGN                                                   !7, 'tmngroup_data8'
   31    25        ASSIGN                                                   !8, 'AxUcmOkj12'
   33    26        FETCH_R                      global              ~49     '_POST'
         27      > JMPZ                                                     ~49, ->36
   35    28    >   FETCH_R                      global              ~50     '_POST'
         29      > FE_RESET_R                                       $51     ~50, ->35
         30    > > FE_FETCH_R                                       ~52     $51, !9, ->35
         31    >   ASSIGN                                                   !10, ~52
   39    32        FETCH_W                      local               $54     !10
         33        ASSIGN                                                   $54, !9
   35    34      > JMP                                                      ->30
         35    >   FE_FREE                                                  $51
   43    36    >   FETCH_R                      global              ~56     '_GET'
         37      > JMPZ                                                     ~56, ->46
   45    38    >   FETCH_R                      global              ~57     '_GET'
         39      > FE_RESET_R                                       $58     ~57, ->45
         40    > > FE_FETCH_R                                       ~59     $58, !9, ->45
         41    >   ASSIGN                                                   !10, ~59
   49    42        FETCH_W                      local               $61     !10
         43        ASSIGN                                                   $61, !9
   45    44      > JMP                                                      ->40
         45    >   FE_FREE                                                  $58
   53    46    >   INIT_FCALL                                               'error_reporting'
         47        SEND_VAL                                                 32767
         48        DO_ICALL                                                 
   54    49        ASSIGN                                                   !11, '%2Fvar%2Fwww%2Fpurelead%2Flog_files%2Fexternal_feed_log%2F'
   55    50        INIT_FCALL                                               'date'
         51        SEND_VAL                                                 'c'
         52        DO_ICALL                                         $65     
         53        ASSIGN                                                   !12, $65
  283    54        INIT_FCALL                                               'date'
         55        SEND_VAL                                                 'Ymd'
         56        DO_ICALL                                         $67     
         57        ASSIGN                                                   !13, $67
  287    58        FETCH_IS                                         ~69     '_POST'
         59        ISSET_ISEMPTY_DIM_OBJ                         0          ~69, 'birth_date'
         60      > JMPZ                                                     ~70, ->66
  289    61    >   INIT_FCALL_BY_NAME                                       'getAge'
         62        SEND_VAR_EX                                              !15
         63        DO_FCALL                                      0  $71     
         64        ASSIGN                                                   !14, $71
         65      > JMP                                                      ->67
  293    66    >   ECHO                                                     'false+-+no+dob+provided'
  346    67    >   INIT_FCALL                                               'lineisvalid'
         68        FETCH_R                      global              ~73     '_POST'
         69        FETCH_DIM_R                                      ~74     ~73, 'telephone'
         70        SEND_VAL                                                 ~74
         71        SEND_VAR                                                 !7
         72        SEND_VAR                                                 !8
         73        DO_FCALL                                      0          
  347    74        INIT_FCALL                                               'mobileisvalid'
         75        FETCH_R                      global              ~76     '_POST'
         76        FETCH_DIM_R                                      ~77     ~76, 'telephone'
         77        SEND_VAL                                                 ~77
         78        SEND_VAR                                                 !7
         79        SEND_VAR                                                 !8
         80        DO_FCALL                                      0          
  348    81        INIT_FCALL                                               'iscallable'
         82        FETCH_R                      global              ~79     '_POST'
         83        FETCH_DIM_R                                      ~80     ~79, 'telephone'
         84        SEND_VAL                                                 ~80
         85        SEND_VAR                                                 !7
         86        SEND_VAR                                                 !8
         87        DO_FCALL                                      0          
  349    88        INIT_FCALL                                               'validatetelephonenumber'
         89        FETCH_R                      global              ~82     '_POST'
         90        FETCH_DIM_R                                      ~83     ~82, 'telephone'
         91        SEND_VAL                                                 ~83
         92        DO_FCALL                                      0          
  352    93        INIT_FCALL_BY_NAME                                       'curl_init'
         94        DO_FCALL                                      0  $85     
         95        ASSIGN                                                   !16, $85
  353    96        BOOL_NOT                                         ~87     !16
         97      > JMPZ                                                     ~87, ->100
  355    98    >   ECHO                                                     'Failed+to+initalise+cURL+object%0A'
         99      > JMP                                                      ->226
  357   100    >   INIT_FCALL                                               'urlencode'
        101        SEND_VAR                                                 !18
        102        DO_ICALL                                         $88     
        103        CONCAT                                           ~89     'https%3A%2F%2Fv3.lolagrove.com%2Fdata.ashx%3Fid%3D7941.1674%26paid_creditors_six_months%3DYes%26email%3D', $88
        104        CONCAT                                           ~90     ~89, '%26firstname%3D'
        105        INIT_FCALL                                               'urlencode'
        106        SEND_VAR                                                 !19
        107        DO_ICALL                                         $91     
        108        CONCAT                                           ~92     ~90, $91
        109        CONCAT                                           ~93     ~92, '%26lastname%3D'
        110        CONCAT                                           ~94     ~93, !20
        111        CONCAT                                           ~95     ~94, '%26address1%3D'
        112        INIT_FCALL                                               'urlencode'
        113        SEND_VAR                                                 !21
        114        DO_ICALL                                         $96     
        115        CONCAT                                           ~97     ~95, $96
        116        CONCAT                                           ~98     ~97, '%26towncity%3D'
        117        INIT_FCALL                                               'urlencode'
        118        SEND_VAR                                                 !22
        119        DO_ICALL                                         $99     
        120        CONCAT                                           ~100    ~98, $99
        121        CONCAT                                           ~101    ~100, '%26postcode%3D'
        122        INIT_FCALL                                               'urlencode'
        123        SEND_VAR                                                 !23
        124        DO_ICALL                                         $102    
        125        CONCAT                                           ~103    ~101, $102
        126        CONCAT                                           ~104    ~103, '%26telephone%3D'
        127        INIT_FCALL                                               'urlencode'
        128        SEND_VAR                                                 !24
        129        DO_ICALL                                         $105    
        130        CONCAT                                           ~106    ~104, $105
        131        CONCAT                                           ~107    ~106, '%26age%3D'
        132        INIT_FCALL                                               'urlencode'
        133        SEND_VAR                                                 !14
        134        DO_ICALL                                         $108    
        135        CONCAT                                           ~109    ~107, $108
        136        CONCAT                                           ~110    ~109, '%26debt_amount%3D'
        137        INIT_FCALL                                               'urlencode'
        138        SEND_VAR                                                 !25
        139        DO_ICALL                                         $111    
        140        CONCAT                                           ~112    ~110, $111
        141        CONCAT                                           ~113    ~112, '%26debt_with%3D'
        142        INIT_FCALL                                               'urlencode'
        143        SEND_VAR                                                 !26
        144        DO_ICALL                                         $114    
        145        CONCAT                                           ~115    ~113, $114
        146        CONCAT                                           ~116    ~115, '%26disposable_income%3D'
        147        INIT_FCALL                                               'urlencode'
        148        SEND_VAR                                                 !27
        149        DO_ICALL                                         $117    
        150        CONCAT                                           ~118    ~116, $117
        151        CONCAT                                           ~119    ~118, '%26iva_bankruptcy%3D'
        152        INIT_FCALL                                               'urlencode'
        153        SEND_VAR                                                 !28
        154        DO_ICALL                                         $120    
        155        CONCAT                                           ~121    ~119, $120
        156        CONCAT                                           ~122    ~121, '%26securekey%3D6e5af886-22e5-4f04-b97b-946539aa70f1'
        157        ASSIGN                                                   !17, ~122
  359   158        FETCH_CONSTANT                                   ~124    'CURLOPT_URL'
        159        INIT_ARRAY                                       ~125    !17, ~124
  360   160        FETCH_CONSTANT                                   ~126    'CURLOPT_RETURNTRANSFER'
  359   161        ADD_ARRAY_ELEMENT                                ~125    <true>, ~126
  361   162        FETCH_CONSTANT                                   ~127    'CURLOPT_SSL_VERIFYPEER'
  359   163        ADD_ARRAY_ELEMENT                                ~125    <true>, ~127
  362   164        FETCH_CONSTANT                                   ~128    'CURLOPT_SSL_VERIFYHOST'
  359   165        ADD_ARRAY_ELEMENT                                ~125    <true>, ~128
  363   166        FETCH_CONSTANT                                   ~129    'CURLOPT_FOLLOWLOCATION'
  359   167        ADD_ARRAY_ELEMENT                                ~125    <true>, ~129
  364   168        FETCH_CONSTANT                                   ~130    'CURLOPT_FAILONERROR'
  359   169        ADD_ARRAY_ELEMENT                                ~125    <true>, ~130
  358   170        ASSIGN                                                   !29, ~125
  367   171        INIT_FCALL_BY_NAME                                       'curl_setopt_array'
        172        SEND_VAR_EX                                              !16
        173        SEND_VAR_EX                                              !29
        174        DO_FCALL                                      0  $132    
        175        BOOL_NOT                                         ~133    $132
        176      > JMPZ                                                     ~133, ->179
  369   177    >   ECHO                                                     'Unable+to+set+properties+on+CURL+object%0A'
        178      > JMP                                                      ->226
  372   179    >   INIT_FCALL_BY_NAME                                       'curl_exec'
        180        SEND_VAR_EX                                              !16
        181        DO_FCALL                                      0  $134    
        182        ASSIGN                                                   !30, $134
  373   183        INIT_FCALL_BY_NAME                                       'curl_getinfo'
        184        SEND_VAR_EX                                              !16
        185        FETCH_CONSTANT                                   ~136    'CURLINFO_HTTP_CODE'
        186        SEND_VAL_EX                                              ~136
        187        DO_FCALL                                      0  $137    
        188        ASSIGN                                                   !31, $137
  374   189        TYPE_CHECK                                   12  ~139    !30
        190      > JMPZ_EX                                          ~139    ~139, ->193
        191    >   BOOL_NOT                                         ~140    !30
        192        BOOL                                             ~139    ~140
        193    > > JMPZ                                                     ~139, ->209
  377   194    >   ECHO                                                     'Error+from+CURL+in+livefeed%3A+%22'
        195        INIT_FCALL_BY_NAME                                       'curl_error'
        196        SEND_VAR_EX                                              !16
        197        DO_FCALL                                      0  $141    
        198        ECHO                                                     $141
        199        ECHO                                                     '%22+'
        200        INIT_FCALL                                               'var_export'
        201        INIT_FCALL_BY_NAME                                       'curl_getinfo'
        202        SEND_VAR_EX                                              !16
        203        DO_FCALL                                      0  $142    
        204        SEND_VAR                                                 $142
        205        SEND_VAL                                                 <true>
        206        DO_ICALL                                         $143    
        207        ECHO                                                     $143
        208      > JMP                                                      ->226
  378   209    >   IS_SMALLER_OR_EQUAL                              ~144    200, !31
        210      > JMPZ_EX                                          ~144    ~144, ->213
        211    >   IS_SMALLER_OR_EQUAL                              ~145    !31, 299
        212        BOOL                                             ~144    ~145
        213    >   BOOL_NOT                                         ~146    ~144
        214      > JMPZ                                                     ~146, ->220
  381   215    >   ROPE_INIT                                     3  ~148    'Error%3A+Tracking+URL+returned+HTTP+'
        216        ROPE_ADD                                      1  ~148    ~148, !31
        217        ROPE_END                                      2  ~147    ~148, '%0A'
        218        ECHO                                                     ~147
        219      > JMP                                                      ->226
  384   220    >   ECHO                                                     'Success%2C+response+was%3A%0A'
  385   221        INIT_FCALL                                               'var_export'
        222        SEND_VAR                                                 !30
        223        DO_ICALL                                         $150    
        224        ECHO                                                     $150
        225        ECHO                                                     '%0A'
  392   226    >   INIT_FCALL_BY_NAME                                       'curl_close'
        227        SEND_VAR_EX                                              !16
        228        DO_FCALL                                      0          
  395   229        ASSIGN_DIM                                               !32
        230        OP_DATA                                                  !30
  396   231        ASSIGN_DIM                                               !32
        232        OP_DATA                                                  !31
  397   233        ASSIGN_DIM                                               !32
        234        OP_DATA                                                  !17
  398   235        INIT_FCALL                                               'logresults'
        236        SEND_VAR                                                 !32
        237        SEND_VAL                                                 'Madison_financial'
        238        DO_FCALL                                      0          
        239      > RETURN                                                   1

Function blacklist:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 19
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 50
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/Ynbon
function name:  blacklist
number of ops:  60
compiled vars:  !0 = $ip, !1 = $time, !2 = $con_ptr, !3 = $ip_blacklist_table, !4 = $update, !5 = $sql, !6 = $res, !7 = $num_rows, !8 = $insert
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
   60     2        BIND_GLOBAL                                              !2, 'con_ptr'
          3        BIND_GLOBAL                                              !3, 'ip_blacklist_table'
   61     4        ISSET_ISEMPTY_CV                                 ~9      !1
          5        BOOL_NOT                                         ~10     ~9
          6      > JMPZ                                                     ~10, ->19
   63     7    >   CONCAT                                           ~11     'UPDATE+', !3
          8        CONCAT                                           ~12     ~11, '+SET+active+%3D+0+WHERE+ip+%3D+%27'
          9        CONCAT                                           ~13     ~12, !0
         10        CONCAT                                           ~14     ~13, '%27+AND+ts+%3C+%27'
         11        CONCAT                                           ~15     ~14, !1
         12        CONCAT                                           ~16     ~15, '%27'
         13        ASSIGN                                                   !4, ~16
   65    14        INIT_FCALL_BY_NAME                                       'mysql_query'
         15        SEND_VAR_EX                                              !4
         16        DO_FCALL                                      0  $18     
         17      > JMPZ                                                     $18, ->19
   66    18    > > RETURN                                                   <true>
   70    19    >   CONCAT                                           ~19     'SELECT+%2A+FROM+', !3
         20        CONCAT                                           ~20     ~19, '+WHERE+ip+%3D+%27'
         21        CONCAT                                           ~21     ~20, !0
         22        CONCAT                                           ~22     ~21, '%27'
         23        ASSIGN                                                   !5, ~22
   71    24        INIT_FCALL_BY_NAME                                       'mysql_query'
         25        SEND_VAR_EX                                              !5
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0  $24     
         28        ASSIGN                                                   !6, $24
   72    29        INIT_FCALL_BY_NAME                                       'mysql_num_rows'
         30        SEND_VAR_EX                                              !6
         31        DO_FCALL                                      0  $26     
         32        ASSIGN                                                   !7, $26
   73    33        IS_EQUAL                                                 !7, 1
         34      > JMPZ                                                     ~28, ->50
   74    35    >   CONCAT                                           ~29     'UPDATE+', !3
         36        CONCAT                                           ~30     ~29, '+SET+active+%3D+1%2C+ts+%3D+%27'
         37        INIT_FCALL                                               'date'
         38        SEND_VAL                                                 'c'
         39        DO_ICALL                                         $31     
         40        CONCAT                                           ~32     ~30, $31
         41        CONCAT                                           ~33     ~32, '%27+WHERE+ip+%3D+%27'
         42        CONCAT                                           ~34     ~33, !0
         43        CONCAT                                           ~35     ~34, '%27'
         44        ASSIGN                                                   !4, ~35
   75    45        INIT_FCALL_BY_NAME                                       'mysql_query'
         46        SEND_VAR_EX                                              !4
         47        DO_FCALL                                      0          
   76    48      > RETURN                                                   <true>
         49*       JMP                                                      ->59
   78    50    >   CONCAT                                           ~38     'INSERT+INTO+', !3
         51        CONCAT                                           ~39     ~38, '+%28ip%29+VALUES+%28%27'
         52        CONCAT                                           ~40     ~39, !0
         53        CONCAT                                           ~41     ~40, '%27%29'
         54        ASSIGN                                                   !8, ~41
   79    55        INIT_FCALL_BY_NAME                                       'mysql_query'
         56        SEND_VAR_EX                                              !8
         57        DO_FCALL                                      0          
   80    58      > RETURN                                                   <true>
   82    59*     > RETURN                                                   null

End of function blacklist

Function checkip:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 100
Branch analysis from position: 56
2 jumps found. (Code = 43) Position 1 = 72, Position 2 = 77
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 77
2 jumps found. (Code = 43) Position 1 = 93, Position 2 = 98
Branch analysis from position: 93
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 98
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 100
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ynbon
function name:  checkIP
number of ops:  102
compiled vars:  !0 = $ip, !1 = $con_ptr, !2 = $UsersTbl, !3 = $ip_blacklist_table, !4 = $fiveminsago, !5 = $sql, !6 = $res, !7 = $num_rows, !8 = $row, !9 = $reg_timestamp, !10 = $timestamp_now, !11 = $difference
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   84     0  E >   RECV                                             !0      
   86     1        BIND_GLOBAL                                              !1, 'con_ptr'
          2        BIND_GLOBAL                                              !2, 'UsersTbl'
          3        BIND_GLOBAL                                              !3, 'ip_blacklist_table'
   88     4        INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'c'
          6        INIT_FCALL                                               'mktime'
          7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'H'
          9        DO_ICALL                                         $12     
         10        SEND_VAR                                                 $12
         11        INIT_FCALL                                               'date'
         12        SEND_VAL                                                 'i'
         13        DO_ICALL                                         $13     
         14        SUB                                              ~14     $13, 5
         15        SEND_VAL                                                 ~14
         16        INIT_FCALL                                               'date'
         17  

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.32 ms | 1431 KiB | 30 Q