Modules/cURL/curl init: Difference between revisions
Jump to navigation
Jump to search
Mack Varial (talk | contribs) No edit summary |
mNo edit summary |
||
Line 10: | Line 10: | ||
outputDebugString("Can't connect to http://mtasa.com/ with cURL"); | outputDebugString("Can't connect to http://mtasa.com/ with cURL"); | ||
else | else | ||
-- lets do something here. | |||
end | end | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |
Revision as of 10:27, 15 March 2012
This function is provided by the external module cURL. You must install this module to use this function. | |
Initialize the curl engine.
Syntax
curl curl_init([string url])
Required arguments
- There are no required arguments.
Optional arguments
- url The url which you want to connect too.
Returns
A valid curl handler on succes, otherwise it returns false
Example
curl = curl_init("http://mtasa.com/"); if not curl then outputDebugString("Can't connect to http://mtasa.com/ with cURL"); else -- lets do something here. end