Modules/cURL/curl init: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Modules/cURL/func_page| | |||
{{ | description = Initialize the curl engine. | ||
Initialize the curl engine. | syntax = curl curl_init(string url)| | ||
required_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/"); | |||
curl curl_init(string url) | |||
* '''url''' The url which you want to connect too. | |||
A valid curl handler on succes, otherwise it returns false | |||
= | |||
curl = curl_init("http://mtasa.com/"); | |||
if not curl then | if not curl then | ||
outputDebugString("Can't connect to http://mtasa.com/ with cURL"); | outputDebugString("Can't connect to http://mtasa.com/ with cURL"); | ||
Line 22: | Line 10: | ||
// lets do something here. | // lets do something here. | ||
end | end | ||
}} | |||
[[Category:Modules]] | [[Category:Modules]] |
Revision as of 20:29, 13 June 2010
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)
Syntax
{{{syntax}}}
Required arguments
- url The url which you want to connect too.
Optional arguments
{{{optional_arguments}}}
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