Ik ben nieuw hier en ik zit al tijdje te prutsen om het geen voor elkaar te krijgen wat ik wil is als er op een link klik dat deze script actief word zo dat ik een pushnotification krijg


<?php
curl_setopt_array($ch = curl_init(), array(
CURLOPT_URL => "https://api.pushover.net/1/messages.json",
CURLOPT_POSTFIELDS => array(
"token" => "****",
"user" => "******",
"device" => "TranceFormers-iPad",
"sound" => "incoming",
"title" => "Muziek download",
"message" => "download mp3",
)));
curl_exec($ch);
curl_close($ch);
?>


Ik hoor graag meer van jullie wie mij even op weg kan helpen hier ik heb al van alles geprobeerd

De site waar die script en bij hordende app is www.pushover.net


M.V.G

een nieuw lid Sebastian
Et voila:


<?php
if (isset($_GET['action'])) {
 if($_GET['action'] == "send") {
  curl_setopt_array($ch = curl_init(), array(
  CURLOPT_URL => "https://api.pushover.net/1/messages.json",
  CURLOPT_POSTFIELDS => array(
    "token" => "****",
    "user" => "***",
    "device" => "TranceFormers-iPad",
    "sound" => "incoming",
    "title" => "Muziek download",
    "message" => "download mp3",
    )));
    curl_exec($ch);
    curl_close($ch);
 } else {
  echo "Deze keuze bestaat niet!";
 }
} else {
echo '<a href="?action=send">Verstuur</a>';
}
?>

Reageren