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 }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/E7tnL:8 Stack trace: #0 {main} thrown in /in/E7tnL on line 8
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.05 ms | 401 KiB | 8 Q