FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV 2024
→
WM calling PHP with parameters and get result
WM calling PHP with parameters and get result
Débuté par PETER ZHOU, 06 avr. 2018 03:05 - 2 réponses
Connectez-vous…
PETER ZHOU
#1
Posté le 06 avril 2018 - 03:05
Hi,
WM and httprequest with php scripts, do i need to know things like user agent, additional http header information before i can use httprequest properly to get the correct result ?
or just pass the URL to httprequest e.g
http://123.com/start.php
with parameters will do?
Regards,
PETER ZHOU
Signaler
0
0
Yogi Yang
#2
Posté le 06 avril 2018 - 05:58
Quote
PETER ZHOU
Hi,
WM and httprequest with php scripts, do i need to know things like user agent, additional http header information before i can use httprequest properly to get the correct result ?
or just pass the URL to httprequest e.g
http://123.com/start.php
with parameters will do?
Regards,
PETER ZHOU
Usually I prefer to use PHP4WD or PHP4WM when it comes to accessing database through PHP. Check this out:
http://27130.foren.mysnip.de/read.php…
But if you prefer to use direct PHP scripts then just use follows:
HTTPRequest("
http://XxXxX.xxx/myphpscript.php…
") IF ErrorOccurred = False THEN sResult is Buffer = HTTPGetResult(httpResult) //Process the Buffer as per your requirements END
I would advise you to please study the code of PHP4WD. You will learn a lot about how to use the HTTP features of WX properly with perfect error handling!!!
HTH
Signaler
0
0
Fabrice Harari
#3
Posté le 06 avril 2018 - 12:33
Hi Peter
it depends of the PHP script and what it is expecting...
The main problem when you work with a webservice is generally the fact that string are by default in unicode on the mobile side, while they are in ansi on the server side... So if you don't convert one way or another, you end up with no understanding between the sides...
Best regards
Signaler
0
0
→ Revenir à WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte