<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class Push extends Controller
{

    public function data(Request $request) {
	#$data = json_decode($request->getContent(), true);
	#$v = $data["values"];
	#$i = $data["items"];

	curl_setopt_array($ch = curl_init(), array(
	  CURLOPT_URL => "https://api.pushover.net/1/messages",
	  CURLOPT_POSTFIELDS => array(
	    "token" => "aihmja456inobzd4pmkrds3x1qrvrh",
	    "user" => "uzuoxsj7o6nitdvvqg5veuraacpnrp",
	    "message" => "hello world",
	  )));
	$result = curl_exec($ch);
	curl_close($ch);

	return "OK";
	//DB::insert('insert into values (user,computer,recv,send) values (?, ?, ?, ?)', [$u, $c, $r, $s]);
    }
}
