executing online php script

BlitzMax Forums/BlitzMax Programming/executing online php script

Kev(Posted 2007) [#1]
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


grable(Posted 2007) [#2]
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



Brucey(Posted 2007) [#3]
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


Kev(Posted 2007) [#4]
Hi Brucey

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

kev


Brucey(Posted 2007) [#5]
Yep. Uses the MIT license : http://en.wikipedia.org/wiki/MIT_License

:o)