Modules/cURL/curl init: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
description = Initialize the curl engine.|
description = Initialize the curl engine.|
syntax = <syntaxhighlight lang="lua">curl curl_init([string url])</syntaxhighlight>|
syntax = <syntaxhighlight lang="lua">curl curl_init([string url])</syntaxhighlight>|
required_arguments      = *There are no required arguments.|
optional_arguments = * '''url''' The url which you want to connect too.|
optional_arguments = * '''url''' The url which you want to connect too.|
returns = A valid curl handler on succes, otherwise it returns false|
returns = A valid curl handler on succes, otherwise it returns false|

Revision as of 16:16, 31 January 2011


Package-x-generic.png 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

See also