Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use WeProxy with PHP

WeProxy — PHP proxy example

Website Integrations

Minimal PHP cURL example: request your exit IP through the WeProxy HTTP proxy gateway.

Requirements

  • PHP 8.0+ with curl extension
  • WeProxy credentials from my.we1.town

Setup

cp .env.example .env

Export 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

Run

php src/check-ip.php

Code

<?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.

Residential vs datacenter

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.

Links

Suggested GitHub topics

php · curl · proxy · http-proxy · residential-proxy · socks5

License

MIT — see LICENSE.

About

Use WeProxy HTTP proxies with PHP cURL

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages