TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. ctaylor
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    ctaylor

    @ctaylor

    0
    Reputation
    179
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    ctaylor Unfollow Follow

    Latest posts made by ctaylor

    • Would this PHP code work?

      Hi,

      Been trying this PHP code and it won't work at all. Tried putting error reporting on and nothing is being thrown up.

      Am I doing anything wrong?

      <?php

      $ch = curl_init();

      curl_setopt($ch, CURLOPT_URL, "https://www.triggercmd.com/api/run/triggerSave");
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS, "{"computer":"FR-CCTV-ANALYSIS","trigger":"armed"}");
      curl_setopt($ch, CURLOPT_POST, 1);

      $headers = array();
      $headers[] = "Authorization: Bearer API Token removed";
      $headers[] = "Content-Type: application/x-www-form-urlencoded";
      curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

      $result = curl_exec($ch);
      if (curl_errno($ch)) {
      echo 'Error:' . curl_error($ch);
      }
      curl_close ($ch);

      ?>

      Thanks a lot if anyone can give some insight!

      posted in General Discussion
      C
      ctaylor