File: publish.php

package info (click to toggle)
ntfy 2.11.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 19,364 kB
  • sloc: javascript: 16,782; makefile: 282; sh: 105; php: 21; python: 19
file content (14 lines) | stat: -rw-r--r-- 509 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

// Check out https://ntfy.sh/phil_alerts in your browser after running this.
file_get_contents('https://ntfy.sh/phil_alerts', false, stream_context_create([
    'http' => [
        'method' => 'POST', // PUT also works
        'header' =>
            "Content-Type: text/plain\r\n" .
            "Title: Unauthorized access detected\r\n" .
            "Priority: urgent\r\n" .
            "Tags: warning,skull",
        'content' => 'Remote access to phils-laptop detected. Act right away.'
    ]
]));