• Your shopping cart is empty!

IP2Proxy .NET Component

This .NET component supports all IP2Proxy™ BIN database products to query proxy IP address and its country, region, city, ISP name and proxy types. It has been optimized for speed and memory utilization.

Installation
To install IP2Proxy, run the following command in the Package Manager Console
PM> Install-Package IP2Proxy
Sample Codes
Imports System.IO

Module TestIP2Proxy

	Sub Main()
		Dim proxy As New IP2Proxy.Component
		Dim all As IP2Proxy.ProxyResult

		Dim isproxy As Integer
		Dim proxytype As String
		Dim countryshort As String
		Dim countrylong As String
		Dim region As String
		Dim city As String
		Dim isp As String

		Dim ip As String = "221.121.146.0"

		If proxy.Open("C:\data\IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.BIN", IP2Proxy.Component.IOModes.IP2PROXY_MEMORY_MAPPED) = 0 Then
			Console.WriteLine("GetModuleVersion: " & proxy.GetModuleVersion())
			Console.WriteLine("GetPackageVersion: " & proxy.GetPackageVersion())
			Console.WriteLine("GetDatabaseVersion: " & proxy.GetDatabaseVersion())

			' reading all available fields
			all = proxy.GetAll(ip)
			Console.WriteLine("Is_Proxy: " & all.Is_Proxy.ToString())
			Console.WriteLine("Proxy_Type: " & all.Proxy_Type)
			Console.WriteLine("Country_Short: " & all.Country_Short)
			Console.WriteLine("Country_Long: " & all.Country_Long)
			Console.WriteLine("Region: " & all.Region)
			Console.WriteLine("City: " & all.City)
			Console.WriteLine("ISP: " & all.ISP)

			' reading individual fields
			isproxy = proxy.IsProxy(ip)
			Console.WriteLine("Is_Proxy: " & isproxy.ToString())

			proxytype = proxy.GetProxyType(ip)
			Console.WriteLine("Proxy_Type: " & proxytype)

			countryshort = proxy.GetCountryShort(ip)
			Console.WriteLine("Country_Short: " & countryshort)

			countrylong = proxy.GetCountryLong(ip)
			Console.WriteLine("Country_Long: " & countrylong)

			region = proxy.GetRegion(ip)
			Console.WriteLine("Region: " & region)

			city = proxy.GetCity(ip)
			Console.WriteLine("City: " & city)

			isp = proxy.GetISP(ip)
			Console.WriteLine("ISP: " & isp)
		Else
			Console.WriteLine("Error reading BIN file.")
		End If
		proxy.Close()


	End Sub

End Module
namespace TestIP2ProxyComponent
{
	class TestIP2Proxy
	{
		static void Main(string[] args)
		{
			IP2Proxy.Component proxy = new IP2Proxy.Component();
			IP2Proxy.ProxyResult all;

			int isproxy;
			string proxytype;
			string countryshort;
			string countrylong;
			string region;
			string city;
			string isp;

			string ip = "221.121.146.0";

			if (proxy.Open("C:\\data\\IP2PROXY-IP-PROXYTYPE-COUNTRY-REGION-CITY-ISP.BIN", IP2Proxy.Component.IOModes.IP2PROXY_MEMORY_MAPPED) == 0)
			{
				System.Console.WriteLine("GetModuleVersion: " + proxy.GetModuleVersion());
				System.Console.WriteLine("GetPackageVersion: " + proxy.GetPackageVersion());
				System.Console.WriteLine("GetDatabaseVersion: " + proxy.GetDatabaseVersion());

				// reading all available fields
				all = proxy.GetAll(ip);
				System.Console.WriteLine("Is_Proxy: " + all.Is_Proxy.ToString());
				System.Console.WriteLine("Proxy_Type: " + all.Proxy_Type);
				System.Console.WriteLine("Country_Short: " + all.Country_Short);
				System.Console.WriteLine("Country_Long: " + all.Country_Long);
				System.Console.WriteLine("Region: " + all.Region);
				System.Console.WriteLine("City: " + all.City);
				System.Console.WriteLine("ISP: " + all.ISP);

				// reading individual fields
				isproxy = proxy.IsProxy(ip);
				System.Console.WriteLine("Is_Proxy: " + isproxy.ToString());

				proxytype = proxy.GetProxyType(ip);
				System.Console.WriteLine("Proxy_Type: " + proxytype);

				countryshort = proxy.GetCountryShort(ip);
				System.Console.WriteLine("Country_Short: " + countryshort);

				countrylong = proxy.GetCountryLong(ip);
				System.Console.WriteLine("Country_Long: " + countrylong);

				region = proxy.GetRegion(ip);
				System.Console.WriteLine("Region: " + region);

				city = proxy.GetCity(ip);
				System.Console.WriteLine("City: " + city);

				isp = proxy.GetISP(ip);
				System.Console.WriteLine("ISP: " + isp);
			}
			else
			{
				System.Console.WriteLine("Error reading BIN file.");
			}
			proxy.Close();

		}
	}
}
Sample IP2Proxy Databases (BIN)
Sample Packages IPv4
IP2Proxy PX1 Sample BIN File Download (5.88 MB)
IP2Proxy PX2 Sample BIN File Download (6.95 MB)
IP2Proxy PX3 Sample BIN File Download (9.30 MB)
IP2Proxy PX4 Sample BIN File Download (13.26 MB)