 
         
             
         
             922 S5 Proxy最新消息
                    922 S5 Proxy最新消息
                通知
您的消息
 
         
                                    高品質IP
 
                                        
                                    國家/地區
 Global
 Global
                                        迴轉
Sticky IP
 
                                            
                                                     
                                                
                                                     
                                                
(1-120分鐘)
主機名:端口
 
                                                建立子帳號
 
                                                密碼
*僅支持在非中國大陸環境下使用。
命令: 複製
hostname:port:username:password
產生
複製全部
.txt
命令:
快速開始
Example:
                
#include iostream
#include stdio.h
#include string
#include Windows.h
#include "curl/curl.h"
#pragma comment(lib, "libcurl.lib")
using namespace std;
static size_t write_buff_data(char* buffer, size_t size, size_t nitems, void* outstream)
{//Copy the received data to the cache
memcpy(outstream, buffer, nitems * size);
return nitems * size;
}
/*
Use HTTP proxy
*/
int GetUrlHTTP(char* url, char* buff)
{
CURL* curl;
CURLcode res;
curl = curl_easy_init();
if (curl)
{
    curl_easy_setopt(curl, CURLOPT_PROXY, "http://ip:port");//Set HTTP proxy address
    curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, "User name: password");//Proxy username password
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void*)buff);//Set Read-Write Cache
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_buff_data);//Set Callback Function
    curl_easy_setopt(curl, CURLOPT_URL, url);//Set URL address
    curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10L);//Sets a long integer to control how many seconds CURLOPT_LOW_SPEED_LIMIT bytes are passed
    curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 50L);//Set a long integer to control how many bytes are transferred
    curl_easy_setopt(curl, CURLOPT_MAX_RECV_SPEED_LARGE, 2000000L);//Maximum download speed
    res = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
    if (res == CURLE_OK) {
        return res;
    }
    else {
        printf("error code:%d\n", res);
        MessageBox(NULL, TEXT("Get IP Error"), TEXT("assistant"), MB_ICONINFORMATION | MB_YESNO);
    }
}
return res;
                
               
             
            