This will deploy instances on digitalocean and create proxies for you. You can select region, how many proxies, what service you want to install or what will be username or password for this proxies.
Name | Requirements | Options | |
---|---|---|---|
api_key | string|required | Get your api key from https://createproxy.com/dashboard/api | |
gprofile | string|required | Get profile_id from https://createproxy.com/api/cloud/get_account_list/ | |
glocation | string|required | nyc1|sgp1|lon1|nyc3|ams3|fra1|tor1|sfo2|blr1|sfo3 | |
ginstance | string|required | s-1vcpu-1gb|512mb|s-1vcpu-2gb|1gb|s-3vcpu-1gb|s-2vcpu-2gb|s-1vcpu-3gb|s-2vcpu-4gb|2gb|s-4vcpu-8gb|m-1vcpu-8gb|c-2|4gb|c2-2vcpu-4gb|g-2vcpu-8gb|gd-2vcpu-8gb|m-16gb|s-8vcpu-16gb|m-2vcpu-16gb|s-6vcpu-16gb|c-4|8gb|c2-4vpcu-8gb ..more options at https://www.digitalocean.com/community/questions/how-to-identify-the-same-sizes-as-are-available-through-the-web-interface | |
service | string|required | ipv4|ipv4_new | |
gproxy | required|numeric|min_len,1|max_len,3 | Number of proxy servers that you want to create | |
gport | numeric|min_len,3|max_len,4 | Port number that will be used, ignored for ipv4_new all other services apply | |
gusername | string | Optional username for proxy (applied only for ipv4 and ipv4_socks_auth service) if blank automatic credentials will be generated no special characters use only letters | |
gpassword | string | Optional password for proxy (applied only for ipv4 and ipv4_socks_auth service) if blank automatic credentials will be generated, no special characters |
// Read more at https://createproxy.com/api/cloud/create_digitalocean_proxies/
// createproxy.class.php is available on GitHub: https://github.com/Coxii/CreateProxy
require_once "createproxy.class.php";
$client = new CreateProxyClient('REPLACE_WITH_YOUR_API_KEY');
$params = array();
$params['gprofile'] = "MyProfileID"; // Get profile_id from https://createproxy.com/api/cloud/get_account_list/
$params['glocation'] = "us-east-1"; // nyc1|sgp1|lon1|nyc3|ams3|fra1|tor1|sfo2|blr1|sfo3
$params['ginstance'] = "lon1"; // s-1vcpu-1gb|512mb|s-1vcpu-2gb|1gb|s-3vcpu-1gb|s-2vcpu-2gb|s-1vcpu-3gb|s-2vcpu-4gb|2gb|s-4vcpu-8gb|m-1vcpu-8gb|c-2|4gb|c2-2vcpu-4gb|g-2vcpu-8gb|gd-2vcpu-8gb|m-16gb|s-8vcpu-16gb|m-2vcpu-16gb|s-6vcpu-16gb|c-4|8gb|c2-4vpcu-8gb ..more options at https://www.digitalocean.com/community/questions/how-to-identify-the-same-sizes-as-are-available-through-the-web-interface
$params['service'] = "ipv4"; // ipv4|ipv4_new
$params['gproxy'] = "5"; // Number of proxy servers that you want to create
$params['gport'] = "3128"; // Port number that will be used, ignored for ipv4_new all other services apply
$params['gusername'] = "MyName"; // Optional username for proxy (applied only for ipv4 and ipv4_socks_auth service) if blank automatic credentials will be generated no special characters use only letters
$params['gpassword'] = "MyPassword123456"; // Optional password for proxy (applied only for ipv4 and ipv4_socks_auth service) if blank automatic credentials will be generated, no special characters
try {
$request = $client->request('cloud','create_digitalocean_proxies',$params);
} catch(CreateProxyException $e) {
print_r($e->getMessage());
exit;
}
echo '<pre>';
print_r($request);
echo '</pre>';
// CreateProxy API end
<!-- Read more at https://createproxy.com/api/cloud/create_digitalocean_proxies/ -->
$api_url = "https://createproxy.com/api/request/cloud/create_digitalocean_proxies/";
$params = array();
$params['api_key'] = "REPLACE_WITH_YOUR_API_KEY"; // Get your api key from https://createproxy.com/dashboard/api
$params['gprofile'] = "MyProfileID"; // Get profile_id from https://createproxy.com/api/cloud/get_account_list/
$params['glocation'] = "us-east-1"; // nyc1|sgp1|lon1|nyc3|ams3|fra1|tor1|sfo2|blr1|sfo3
$params['ginstance'] = "lon1"; // s-1vcpu-1gb|512mb|s-1vcpu-2gb|1gb|s-3vcpu-1gb|s-2vcpu-2gb|s-1vcpu-3gb|s-2vcpu-4gb|2gb|s-4vcpu-8gb|m-1vcpu-8gb|c-2|4gb|c2-2vcpu-4gb|g-2vcpu-8gb|gd-2vcpu-8gb|m-16gb|s-8vcpu-16gb|m-2vcpu-16gb|s-6vcpu-16gb|c-4|8gb|c2-4vpcu-8gb ..more options at https://www.digitalocean.com/community/questions/how-to-identify-the-same-sizes-as-are-available-through-the-web-interface
$params['service'] = "ipv4"; // ipv4|ipv4_new
$params['gproxy'] = "5"; // Number of proxy servers that you want to create
$params['gport'] = "3128"; // Port number that will be used, ignored for ipv4_new all other services apply
$params['gusername'] = "MyName"; // Optional username for proxy (applied only for ipv4 and ipv4_socks_auth service) if blank automatic credentials will be generated no special characters use only letters
$params['gpassword'] = "MyPassword123456"; // Optional password for proxy (applied only for ipv4 and ipv4_socks_auth service) if blank automatic credentials will be generated, no special characters
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "$api_url");
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt($ch, CURLOPT_REFERER, $_SERVER['SERVER_NAME']);
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_ENCODING,"gzip,deflate");
$result=curl_exec($ch);
curl_close($ch);
if($result === false) {
die("Failed to perform request");
}
$response = json_decode($result, true);
if(!$response) {
die('CreateProxy responded with invalid response');
} else if(!isset($response['type'])) {
die('CreateProxy responded with incorrect status key');
} else if($response['type'] == 'error') {
if(isset($response['title']) AND isset($response['message'])) {
die($response['title']. ': ' . $response['message']);
} else if(isset($response['message'])){
die('API ERROR: ' . $response['message']);
} else {
die('API UNDEFINNED ERROR');
}
}
echo '<pre>';
print_r($response);
echo '</pre>';
<!-- CreateProxy API end -->
// read more at https://createproxy.com/api/cloud/create_digitalocean_proxies/
using System;
using System.Diagnostics;
using System.Net;
using System.IO;
class Program
{
static void Main(string[] args)
{
string api_key = "REPLACE_WITH_YOUR_API_KEY";
string gprofile = "MyProfileID";
string glocation = "us-east-1";
string ginstance = "lon1";
string service = "ipv4";
string gproxy = "5";
string gport = "3128";
string gusername = "MyName";
string gpassword = "MyPassword123456";
string serviceUri = "https://createproxy.com/api/request/cloud/create_digitalocean_proxies/";
string post_data = "api_key=" + api_key + "gprofile=" + gprofile + "glocation=" + glocation + "ginstance=" + ginstance + "service=" + service + "gproxy=" + gproxy + "gport=" + gport + "gusername=" + gusername + "gpassword=" + gpassword;
// create a request
HttpWebRequest request = (HttpWebRequest)
WebRequest.Create(serviceUri);
request.Method = "POST";
// turn our request string into a byte stream
byte[] postBytes = System.Text.Encoding.ASCII.GetBytes(post_data);
// this is important - make sure you specify type this way
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = postBytes.Length;
Stream requestStream = request.GetRequestStream();
// now send it
requestStream.Write(postBytes, 0, postBytes.Length);
requestStream.Close();
// grab te response and print it out to the console
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Console.WriteLine(new StreamReader(response.GetResponseStream()).ReadToEnd());
Console.ReadLine();
}
}
curl -X POST -F 'api_key=REPLACE_WITH_YOUR_API_KEY' -F 'gprofile=MyProfileID' -F 'glocation=us-east-1' -F 'ginstance=lon1' -F 'service=ipv4' -F 'gproxy=5' -F 'gport=3128' -F 'gusername=MyName' -F 'gpassword=MyPassword123456' https://createproxy.com/api/request/cloud/create_digitalocean_proxies/
import requests
files = {
'api_key': (None, 'REPLACE_WITH_YOUR_API_KEY'),
'gprofile': (None, 'MyProfileID'),
'glocation': (None, 'us-east-1'),
'ginstance': (None, 'lon1'),
'service': (None, 'ipv4'),
'gproxy': (None, '5'),
'gport': (None, '3128'),
'gusername': (None, 'MyName'),
'gpassword': (None, 'MyPassword123456'),
}
response = requests.post('https://createproxy.com/api/request/cloud/create_digitalocean_proxies/', files=files)