executing online php script

BlitzMax Forums/BlitzMax Programming/executing online php script

Hi Guys!

I wonder it its possable to execute a online php script without using OpenURL, I want the script run in the background and not in the default net software. i also wonder if its possable to directly receive values back from the script in max.

any idea if its even possable or a alternative method to do this?

kev

You can use HTTP Streams, or use TSocketStream to manually handle HTTP.

HTTP Streams only do GET. If you need POST you have to hack it yourself :/

example using HTTP Streams:
Local stream:TStream = ReadStream( "http::www.testing.org")
If stream Then
	Print ":: conntected"
	While Not stream.Eof()
		Print stream.ReadLine()
	Wend
	stream.Close()
Else
	Print ":: oops"
EndIf


If you need POST or HTTPS, perhaps one of these will help :

http://brucey.net/programming/blitz/index.php#bahlibcurl
http://brucey.net/programming/blitz/index.php#bahlibcurlssl

Hi Brucey

I think thats just what im after, can they be used in a commercial module?

kev

Yep. Uses the MIT license : http://en.wikipedia.org/wiki/MIT_License

:o)