how to send string to website ( php script ) ?

Blitz3D Forums/Blitz3D Beginners Area/how to send string to website ( php script ) ?

Prym(Posted 2014) [#1]
I would like to know how to send a string
from my game to my website ( php script ) ?

Are the B3D TCPstream commands indicated ?
Can someone give me a little and simple example
of the way to send a string message to a webpage ?

Thank you for the answers of the forum users .


xlsior(Posted 2014) [#2]
You can launch your default webbrowser from within your program and have it pass the info for you:

ExecFile("http://mywebsite.web/phpfile.php?a=stringtopass")


Your PHP file can see the a=... variable, and do stuff with it accordingly.

Not sure how to do it 'hidden' in the background from B3D

(It's easy in Blitzmax, where the open file commands have the ability to load stuff directly over a http:// connection)


Prym(Posted 2014) [#3]
Hello xlsior ,
Thank you for your help .

I will try things with your example .

I have to learn some php html commands which can serve my ideas .
Please , have you an example for a php script which receive the string ?
I know it's not blitzbasic , but after reading many pages ,
I still need a simple example with bb and php communication .

apry241
http://prymprog.wikeo.net


RemiD(Posted 2014) [#4]
To retrieve datas in the url in php you can use the GET method.
see :
http://www.php.net/manual/en/reserved.variables.get.php


Prym(Posted 2014) [#5]
Merci pour le lien vers PHP .
Tout bien traduit en toutes langues !