News for hackers. Stuff that matters.
Re:Convert curl commands to code in several languages by binwiederhier on Saturday March 12, 2022 @11:15AM (#30652359)
I am on my phone so I can't contribute a PR right now, but here are tons of PHP examples: https://ntfy.sh/docs/publish/

Also check the other pages on the docs.

Here's one example:

   file_get_contents('https://ntfy.sh/mytopic', false, stream_context_create([
    'http' => [
        'method' => 'POST', // PUT also works
        'header' => 'Content-Type: text/plain',
        'content' => 'Backup successful '
    ]
   ]));
Re:Convert curl commands to code in several languages by verhovsky on Saturday March 19, 2022 @06:18AM (#30732602)
Someone contributed a PR that replaced the PHP output with libcurl