Skip to content

Instantly share code, notes, and snippets.

@Kristjan-Reinsberg
Kristjan-Reinsberg / JWT PHP CURL
Last active February 16, 2025 16:07
Use Curl Post request to get JWT (Json Web Token) and make request with that token
/**
* @author Krisjan Reinsberg
* @Use Curl Post request to get JWT (Json Web Token) and make request with that token
**/
function http_post($url, $jsonData)
{
$ch = curl_init($url);
$jsonDataEncoded = json_encode($jsonData);