How to use the http library or get data from a webpage

Hi i would like to know how I can access my a webpage via. a script eg.

I have this site setup and i would like to get its data
http://phptestsite.comeze.com/return.php
All it is is this atm but I will make more use of it once i figure things out



<?
echo "Return data here"
?>


So what I want to know is there a function that I can call and have it return the data



MyData = AccessWeb(SiteURL)


Sort of like that

http.Fetch would be what you’re looking for. Note that all functions that require a response such as database, http, etc, you need a call-back, which is what these nested functions are. You can use your own; but it won’t be processed instantly, and the rest of your game-mode/script will continue running while it’s fetching.

[lua]http.Fetch( “website URL”,
function( contents )
// On success
end,
function( )
// On Error
end
)[/lua]