php get ip from proxy -


i think i'm not understanding well...

i'm developing php script, inserts new row in table. there's 1 field named 'ip_address', , want use proxy have, change ip address, not insert same ip (the server of website).

i'm doing this:

$loginpassw = 'login:passw'; $proxy_ip = 'xx.xxx.xxx.xxx'; $proxy_port = 'xx'; $url = "http://www.domain.com";  $ch = curl_init(); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_header, 0); curl_setopt($ch, curlopt_returntransfer, 1); curl_setopt($ch, curlopt_proxyport, $proxy_port); curl_setopt($ch, curlopt_proxytype, 'http'); curl_setopt($ch, curlopt_proxy, $proxy_ip); curl_setopt($ch, curlopt_proxyuserpwd, $loginpassw); $data = curl_exec($ch); curl_close($ch); 

how obtain changed ip? want obtain it, , insert in database.

best regards, daniel

edit: what want not being detected i'm doing through same ip...

the script receiving query should able obtain clients ip address accessing variable: $_server['remote_addr']. should return address of proxy server.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -