Hi! Could we please enable some services and cookies to improve your experience and our website?

PHPize Online / SQLize Online  /  SQLtest Online

A A A
Login    Share code      Blog   FAQ

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

Copy Format Clear
create table t (id int primary key auto_increment, val int);

Stuck with a problem? Got Error? Ask AI support!

Copy Clear
Copy Format Clear
<?php function curlWrapper($urlMethod, $data) { $json = json_encode($data); $ch = curl_init(); define("HOAXFLOW", "something"); curl_setopt($ch, CURLOPT_URL, 'https://site.site/api?'.$urlMethod.'='.HOAXFLOW); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //117* curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return $response; } $res = curlWrapper('Method', ['test'=>'test']);
Copy Clear