CURL

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, PERELINK_SERVER_URL . $url . '&code=' . $code_perelink);
                           // add_test_str('CURLOPT_URL='.PERELINK_SERVER_URL . $url . '&code=' . $code_perelink);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_TIMEOUT, 3);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
    curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
    $text = curl_exec($ch);
    curl_close($ch);