3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * This PHP file is a sample request for initiating the payment request through Next-Web. * In this file, the assumtion is that the business knows his Next-Web user, pass, product and amount as minimum requirements * The business will then send a post request with the information to this file and it will do the redirection to the payment page automatically. * Business can optionally provide some comments about the product which will not be displayed to the users but will be stored in our database for referencing. */ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://www.nextkw.com/api/getid"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, "user=" . "kuwaityogaeventweb" . "&pass=" . "0f40a650f77de192076d88c70cb7ebd3dd3cf4187dd897e13d6b80a0ef2c832a"); // yourNextWebUser is the NextWeb user and yourNextWebPass is the NextWeb password. Replace them with your actual user and pass curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $ReturnValue = curl_exec($ch); curl_close ($ch); if($ReturnValue == "Error"){//An Error has occured generating the URL for payment. This can happen due to invalid credentials or any other errors. echo " An Error Occured"; } else { ?> <!DOCTYPE html> <html> <head></head> <body> <form id="PaymentForm" action= "<?php echo $ReturnValue; ?>" method="POST"> <!-- $ReturnValue will be the URL for payment --> <input type="hidden" id="amount" name="NWAMNT" value="10"> <!-- This is the Amount for payment --> <input type="hidden" id="tracking"name="TrackingID" value="0"> <!-- This is an optional ID for the businesses and will be returned at the end of payment. NOTE: This piece of information will not be stored in the transactions. --> <input type="hidden" id="Product" name="Product" value="yoga event"> <!-- This is the product that is being sold. This will be displayed to the user and is a necessary input. --> <input type="hidden" id="Comment" name="comment" value="test"> <!-- This is an optional input and will be shown in the dashboard for next web as comment. a useful piece of information for checking details from the dashboard. --> </form> <script> /* This will make sure that the form for payment is submitted automatically */ document.getElementById("PaymentForm").submit(); document.write(""); </script> </body> </html> <?php }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E7tnL
function name:  (null)
number of ops:  42
compiled vars:  !0 = $ch, !1 = $ReturnValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL_BY_NAME                                       'curl_init'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
    9     3        INIT_FCALL_BY_NAME                                       'curl_setopt'
          4        SEND_VAR_EX                                              !0
          5        FETCH_CONSTANT                                   ~4      'CURLOPT_URL'
          6        SEND_VAL_EX                                              ~4
          7        SEND_VAL_EX                                              'https%3A%2F%2Fwww.nextkw.com%2Fapi%2Fgetid'
          8        DO_FCALL                                      0          
   10     9        INIT_FCALL_BY_NAME                                       'curl_setopt'
         10        SEND_VAR_EX                                              !0
         11        FETCH_CONSTANT                                   ~6      'CURLOPT_POST'
         12        SEND_VAL_EX                                              ~6
         13        SEND_VAL_EX                                              1
         14        DO_FCALL                                      0          
   11    15        INIT_FCALL_BY_NAME                                       'curl_setopt'
         16        SEND_VAR_EX                                              !0
         17        FETCH_CONSTANT                                   ~8      'CURLOPT_POSTFIELDS'
         18        SEND_VAL_EX                                              ~8
         19        SEND_VAL_EX                                              'user%3Dkuwaityogaeventweb%26pass%3D0f40a650f77de192076d88c70cb7ebd3dd3cf4187dd897e13d6b80a0ef2c832a'
         20        DO_FCALL                                      0          
   12    21        INIT_FCALL_BY_NAME                                       'curl_setopt'
         22        SEND_VAR_EX                                              !0
         23        FETCH_CONSTANT                                   ~10     'CURLOPT_RETURNTRANSFER'
         24        SEND_VAL_EX                                              ~10
         25        SEND_VAL_EX                                              <true>
         26        DO_FCALL                                      0          
   13    27        INIT_FCALL_BY_NAME                                       'curl_exec'
         28        SEND_VAR_EX                                              !0
         29        DO_FCALL                                      0  $12     
         30        ASSIGN                                                   !1, $12
   14    31        INIT_FCALL_BY_NAME                                       'curl_close'
         32        SEND_VAR_EX                                              !0
         33        DO_FCALL                                      0          
   15    34        IS_EQUAL                                                 !1, 'Error'
         35      > JMPZ                                                     ~15, ->38
   16    36    >   ECHO                                                     '+An+Error+Occured'
         37      > JMP                                                      ->41
   19    38    >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Chead%3E%3C%2Fhead%3E%0A%3Cbody%3E%0A%3Cform+id%3D%22PaymentForm%22+action%3D+%22'
   23    39        ECHO                                                     !1
         40        ECHO                                                     '%22+method%3D%22POST%22%3E+%3C%21--+%24ReturnValue+will+be+the+URL+for+payment+--%3E%0A+++%3Cinput+type%3D%22hidden%22+id%3D%22amount%22+name%3D%22NWAMNT%22+value%3D%2210%22%3E+%3C%21--+This+is+the+Amount+for+payment+--%3E%0A+++%3Cinput+type%3D%22hidden%22+id%3D%22tracking%22name%3D%22TrackingID%22+value%3D%220%22%3E+%3C%21--+This+is+an+optional+ID+for+the+businesses+and+will+be+returned+at+the+end+of+payment.+NOTE%3A+This+piece+of+information+will+not+be+stored+in+the+transactions.+--%3E%0A+++%3Cinput+type%3D%22hidden%22+id%3D%22Product%22+name%3D%22Product%22+value%3D%22yoga+event%22%3E+%3C%21--+This+is+the+product+that+is+being+sold.+This+will+be+displayed+to+the+user+and+is+a+necessary+input.+--%3E%0A+++%3Cinput+type%3D%22hidden%22+id%3D%22Comment%22+name%3D%22comment%22+value%3D%22test%22%3E+%3C%21--+This+is+an+optional+input+and+will+be+shown+in+the+dashboard+for+next+web+as+comment.+a+useful+piece+of+information+for+checking+details+from+the+dashboard.+--%3E%0A%3C%2Fform%3E%0A%3Cscript%3E%0A++++%2F%2A+This+will+make+sure+that+the+form+for+payment+is+submitted+automatically+%2A%2F%0A++++document.getElementById%28%22PaymentForm%22%29.submit%28%29%3B%0A++++document.write%28%22%22%29%3B%0A%3C%2Fscript%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E%0A'
   37    41    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.42 ms | 1399 KiB | 13 Q