Forum About Proxy
December 30, 2024, 05:20:59 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: What is an anonymous proxy server? Proxy types: transparent, anonymous or elite. Go back to FreeProxyList.org or Proxy-List.org
 
   Home   Help Search GoogleTagged Login Register  
Hide My IP VPN - Access Sites You Love When Abroad! Hide Your Identity and Surf Privately!
Pages: [1]
  Print  
Author Topic: PHP Script To Download The Proxy List  (Read 358190 times)
quixrick
Newbie
*
Posts: 2


View Profile
« 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);

?>

Logged
HIF
Administrator
Full Member
*****
Posts: 211


277767
View Profile WWW
« Reply #1 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];
?>
Logged

Pages: [1]
  Print  

 
Jump to:  

Скройте свой IP-адрес в два клика. 72 страны, 17 штатов США и множество городов. Смена IP-адреса для всего компьютера сразу.
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!