Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Main Repository

Disclaimer

The example code only shows basic authentication through a proxy while sending requests with PHP. If you want to continue further development, we highly recommend reading their documentation.

Prerequisites

Install and set up the PHP programming language on your machine. If you don't want to use the default built-in HTTP server, you'll also need to install one, such as Apache.

You should also have a Decodo account with access to the dashboard to get your credentials and endpoint information.

Installation

  1. Create a project directory.
  2. Open the directory using the Terminal/Command prompt using the cd directory_name command.
  3. Execute the following command to download the proxy setup example file:

HTTP(s): curl https://raw.githubusercontent.com/Decodo/Decodo/master/php/php.php > php.php

SOCKS5: curl https://raw.githubusercontent.com/Decodo/Decodo/master/php/php.php > phpsocks5h.php

image
  1. You should see a new file named php.php in your project folder. Open it using an editor of your choice.

  2. To run this example, set your username, password, and endpoint information you'd like to use and enter them in the following sections of the code:

$username = 'username';
$password = 'password';
$proxy = 'gate.decodo.com:7000';
$target = curl_init('https://ip.decodo.com/')

Usage

To run this example code, you'll need to set up your HTTP server.

Once you have it set up, you can access the file with the path it has been stored in your server. For example, http://localhost/php.php

You should see an IP address in the console window if everything was set up correctly:

Decodo successful php connection

Need help?

Email - [email protected]

Live chat 24/7