Slack api command auth.text by PHP curl

Issuing auth.test method using PHP curl.

<?php
$token= //your login token
$url = 'https://slack.com/api/auth.test';

$parameters = array("token" => $token);


if ($query = http_build_query($parameters))
    $url .= '?' . $query;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

$result = curl_exec($ch);
echo var_dump($result);
if($result === false)
{
    echo 'Curl error: ' . curl_error($ch);
}

curl_close($ch);
?>