Skip to content

Instantly share code, notes, and snippets.

@SnisterX96
SnisterX96 / 1-file_get_contents.php
Created June 23, 2023 08:22 — forked from daveh/1-file_get_contents.php
How to call APIs from PHP: file_get_contents, cURL, Guzzle and SDKs (code to accompany https://youtu.be/wMyP-q3nPd4)
<?php
$payload = json_encode([
"title" => "Updated title"
]);
$options = [
"http" => [
"method" => "PATCH",
"header" => "Content-type: application/json; charset=UTF-8\r\n" .