Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Http Post and PHP GET

    Scheduled Pinned Locked Moved WiPy 2&3
    wipy 3.0http postlopy4
    4 Posts 3 Posters 530 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W Offline
      Wolli01
      last edited by

      Ich komme einfach nicht weiter.
      Ich will einfach nur ein Inhalt per POST zu meinem Webserver senden wo ich den Inhalt in PHP per GET auslesen will.
      Seit 3 Tagen habe ich alle Codes die ich gefunden habe probiert, leider wird nichts gespeichert.
      urequest ist vorhanden.

      Hier mein PHP Code
      <?php
      //Sensor1

      $p1 = $_GET["p1"];
      $p2 = $_GET["p2"];
      $p3 = $_GET["p3"];

      $p4 = $_GET["p4"];
      $p5 = $_GET["p5"];

      $p6 = $_GET["p6"];
      $p7 = $_GET["p7"];
      $p8 = $_GET["p8"];
      $p9 = $_GET["p9"];
      $p10 = $_GET["p10"];

      $p11 = $_GET["p11"];
      $p12 = $_GET["p12"];
      $p13 = $_GET["p13"];
      $p14 = $_GET["p14"];
      $p15 = $_GET["p15"];

      $p16 = $_GET["p16"];
      $p17 = $_GET["p17"];
      $p18 = $_GET["p18"];
      $p19 = $_GET["p19"];
      $p20 = $_GET["p20"];

      $inhalt = array($p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9, $p10, $p11, $p12, $p13, $p14, $p15, $p16, $p17, $p18, $p19, $p20);
      // Speichern der Datei
      $eintrag = implode(";", $inhalt);
      file_put_contents("sensor1.txt", $eintrag);
      ?>

      1 Reply Last reply Reply Quote 0
      • W Offline
        Wolli01
        last edited by

        Keiner eine Idee?

        1 Reply Last reply Reply Quote 0
        • P Offline
          Paul Thornton
          last edited by

          You are sending POST requests. but looking for GET paramaters in the PHP script.
          use $_POST (or $_QUERY) not $_GET.

          Sie senden POST-Anfragen. Suchen Sie jedoch nach GET-Parametern im PHP-Skript.
          Verwenden Sie $ _POST (oder $ _QUERY) und nicht $ _GET.

          1 Reply Last reply Reply Quote 1
          • C Offline
            Clyde Bess
            last edited by

            Bist du weitergekommen?
            Ich suche vergebens nach einer Lösung die API von pushsafer anzusprechen.
            Leider kann der Betreiber von Pushsafer hier nicht unterstützen..

            Grüße Clyde

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom