Minimal PHP cURL example: request your exit IP through the WeProxy HTTP proxy gateway.
- PHP 8.0+ with
curlextension - WeProxy credentials from my.we1.town
cp .env.example .envExport variables (PHP does not load .env automatically in this minimal sample):
export WEPROXY_USER="your-user"
export WEPROXY_PASS="your-pass"PowerShell:
$env:WEPROXY_USER="your-user"
$env:WEPROXY_PASS="your-pass"Gateway defaults:
Host: gw.weproxy.com.tr
Port: 8989
php src/check-ip.php<?php
$ch = curl_init('https://api.ipify.org');
curl_setopt($ch, CURLOPT_PROXY, 'gw.weproxy.com.tr:8989');
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'USER:PASSWORD');
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
echo curl_exec($ch);Full script: src/check-ip.php.
Point the same gateway at the package credentials you bought — e.g. rotating residential or rotating datacenter. Host and port do not change.
SOCKS5 is only for packages that enable it in the panel; this sample uses HTTP proxy mode.
php · curl · proxy · http-proxy · residential-proxy · socks5
MIT — see LICENSE.
