RaspberryPi MotionEye and Pushover

 Python

#!/usr/bin/python

import httplib, urllib

$token = '';
$user = '';

conn = httplib.HTTPSConnection("api.pushover.net:443")
conn.request("POST", "/1/messages.json",
  urllib.urlencode({
    "token": "TOKEN",     
    "user": "USER", 
    "html": "1",                                # 1 for HTML, 0 to disable
    "title": "Motion Detected!",                # Title of the message
    "message": "<b>Front Door</b> camera!",     # Content of the message
    "url": "http://192.168.178.71:8081",         # Link to be included in message
    "url_title": "View live stream",            # Text for the link
    "sound": "siren",                           # Define the sound played   
  }), { "Content-type": "application/x-www-form-urlencoded" })
conn.getresponse()

PHP

#!/usr/bin/php
<?php

curl_setopt_array($ch = curl_init(), array(
  CURLOPT_URL => "https://api.pushover.net/1/messages.json",
  CURLOPT_POSTFIELDS => array(
    "token" => $pushover_app_token,
    "user" => $pushover_user_key,
    "message" => $output,
    "attachment" => curl_file_create($output_image, "image/jpeg"),
  ),
  CURLOPT_SAFE_UPLOAD => true,
  CURLOPT_RETURNTRANSFER => true,
));
curl_exec($ch);
curl_close($ch);