Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How do I make a POST using X-HTTP-Method-Override with a PHP curl request?
- $curl = curl_init();
- curl_setopt($curl, CURLOPT_URL, $url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_POST, 1);
- curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
- $response = curl_exec($curl);
- curl_close($curl);
- echo $response;
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-HTTP-Method-Override: GET') );
- curl_setopt($curl, CURLOPT_HTTPHEADER, array('X-HTTP-Method-Override: GET'));
Add Comment
Please, Sign In to add comment