Http Post and PHP GET
-
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);
?> -
Keiner eine Idee?
-
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. -
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
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