ERLEDIGT
NEIN
NEIN
ANTWORTEN
2
2
ZUGRIFFE
5434
5434
EMPFEHLEN
-
Hallo Leute,
ich habe da ein Problem mit dem HTTP GET request und der Auswertung mit PHP.
Ich habe ein Streamin-Modem, welches ich in Intervallen checken möchte ob es funktioniert.
Das Modem schickt ein HTTP GET request z.B. mit
GET sensors/data/submit?mac=<mac address>&alarm=false&info=<info> HTTP/1.0
ich habe eine datei "submit.php" im entsprechenden Ordner und möchte die Variablen mit z.B. $mac=$_GET["mac"]; auslesen.
Das funktioniert aber nicht, da durch den HTTP GET nicht die Endung submit.php? aufgerufen wird, sondern nur submit?
Was muss ich machen, damit ich da zugreifen kann?
Danke für eine schnelle Antwort
Dirk
-
Ich kann dir zwar nicht wirklich folgen, aber
Das Modem schickt ein HTTP GET request z.B. mit
GET sensors/data/submit?mac=<mac address>&alarm=false&info=<info> HTTP/1.0
ggf fehlt da ja nnur das .php
GET sensors/data/submit.php?mac=<mac address>&alarm=false&info=<info> HTTP/1.0
-
ja es fehlt beim request das .php - allerdings ist das vorkonfiguriert - ich kann es nicht ändern.
Auszug aus der Bedienungsanleitung:
"
To run an own monitoring server you will need to write your own scripts depending on the server architecture and OS (PHP, ASP...).
The script has to be named “submit” and should be available in the folder “/sensors/data” as the “Streaming Client” firmware sends an HTTP GET request for
"sensors/data/submit?..." to that server. This path is fixed and can not be changed. The information is included after the questions mark.
GET sensors/data/submit?mac=<mac address>&alarm=false&info=<info> HTTP/1.0
Example “submit.php”
The submit PHP script can read the variables from the $_GET array e.g.:
$mac=$_GET["mac"]; // here you can check if the MAC address is registered in your database and decide to accept/ignore this request
$alarm=$_GET["alarm"]; // alarm is always "false"
$info=$_GET["info"]; // comma separated list of "measured values"
The $info variable will contain complete device info which is the string as described in the section above.
The GET variable handling is all standard, there's nothing "MTELL specific", you can access the variables as in any other web CGI script."
das funktioniert bloß nicht, da er die datei nicht als php erkennt ?
Ähnliche Themen
-
HTTP-Request mit QT
Von cesupa im Forum C/C++Antworten: 3Letzter Beitrag: 22.02.08, 19:25 -
Http-request ?!
Von mIschKo im Forum Visual Basic 6.0Antworten: 0Letzter Beitrag: 03.10.07, 18:32 -
HTTP Request
Von MagicEpox im Forum Sonstige SprachenAntworten: 2Letzter Beitrag: 02.08.07, 14:08 -
Variable im HTTP Request leeren
Von sadi im Forum HTML & XHTMLAntworten: 5Letzter Beitrag: 08.04.07, 22:53 -
HTTP Request
Von e2r im Forum CGI, Perl, Python, Ruby, Power ShellAntworten: 2Letzter Beitrag: 07.02.07, 18:38





Zitieren
Login






[PHP][Snippet] Array zu XML konvertieren