Forum About Proxy

Forum (only english) => Scripts and programs => Topic started by: quixrick on January 05, 2012, 09:13:37 PM

Hide My IP VPN - Access Sites You Love When Abroad! Hide Your Identity and Surf Privately!


Title: PHP Script To Download The Proxy List
Post by: quixrick on January 05, 2012, 09:13:37 PM
This Is A Simple PHP Script That Will Download The Proxy File And Put It On Your Server For Parsing.

Code:
<?php

$proxy_url 
'http://freeproxylist.org/en/downloader.php?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&filter=usca|any|23|2|any|any|0|10|15.0000|70|10'// DYNAMIC LINK
$path 'data/proxy_'.date("YmdHis").'.txt'// PATH WHERE THE FILE WILL LIVE ... MUST BE WRITABLE
 
$fp fopen($path'w');

$ch curl_init($proxy_url);
curl_setopt($chCURLOPT_FILE$fp);
curl_exec($ch);
curl_close($ch);

fclose($fp);

?>



Title: Re: PHP Script To Download The Proxy List
Post by: HIF on January 08, 2012, 12:18:46 AM
Thanks for sharing a good script! Here is solution if you do not have CURL on your web server (it is almost impossible but who knows?):

Code:
<?php
$proxy_url 
'http://freeproxylist.org/en/downloader.php?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&filter=usca|any|23|2|any|any|0|10|15.0000|70|10'// DYNAMIC LINK
$path 'data/proxy_'.date("YmdHis").'.txt'// PATH WHERE THE FILE WILL LIVE ... MUST BE WRITABLE

$buffer file_get_contents($proxy_url);
file_put_contents($path$buffer);
?>

If you need to have all proxy servers as array in your script then you can use this method:

Code:
<?php 
$proxy_url 
'http://freeproxylist.org/en/downloader.php?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&filter=usca|any|23|2|any|any|0|10|15.0000|70|10'// DYNAMIC LINK

$proxy_servers array_map('trim'file($proxy_url));
echo 
$proxy_servers[0];
echo 
$proxy_servers[1];
?>
Скройте свой IP-адрес в два клика. 72 страны, 17 штатов США и множество городов. Смена IP-адреса для всего компьютера сразу.