<?php
/*
ProxyWEB 1.0 by WHK
Nice Multidimensionals Arrays
*/
// Prueba de uso [Inicio]
'url' => 'http:// mi servidor local de pruebas',
);
echo 'Iniciando ...<br />';
for($cuenta = 1; $cuenta < 5; $cuenta++){
$conecta['proxy_id'] = $cuenta;
if(http_proxy($conecta))
echo 'conexión enviada!<br />';
else
echo 'Imposible conectar!<br />';
}
echo 'Terminado!';
// Prueba de uso [Final]
/* Proxy */
function http_proxy($array_data){
/*
Dimensión del array $array_data
---------
url
post_data = false
referer = false
cookies = false
user_agent = false
seguir = false
return_header = true
proxy_id = false
proxy_id
--------
1 = anonymouse.org
2 = unblocker.in
3 = unblocksiteproxy.info
4 = tunnelcafe.com
5 = unblockfacebook.mobi
*/
if(!$array_data['url'])
return false; /* No hay URL */
if($array_data['proxy_id'] == '1'){
/* Anonymouse.org */
$array_data['url'] = 'http://anonymouse.org/cgi-bin/anon-www.cgi/'.$array_data['url'];
return http_req($array_data);
}elseif($array_data['proxy_id'] == '2'){
/* unblocker.in */
$array_data['proxy_server'] = 'www.femalethick.cn';
$array_data['metodo_proxy'] = '1';
return metodo_proxy($array_data);
}elseif($array_data['proxy_id'] == '3'){
/* unblocksiteproxy.info */
$array_data['proxy_server'] = 'www.unblocksiteproxy.info';
$array_data['metodo_proxy'] = '1';
return metodo_proxy($array_data);
}elseif($array_data['proxy_id'] == '4'){
/* tunnelcafe.com */
$array_data['proxy_server'] = 'www.tunnelcafe.com';
$array_data['metodo_proxy'] = '1';
return metodo_proxy($array_data);
}elseif($array_data['proxy_id'] == '5'){
/* unblockfacebook.mobi */
$array_data['proxy_server'] = 'www.unblockfacebook.mobi';
$array_data['metodo_proxy'] = '2';
return metodo_proxy($array_data);
}
}
function metodo_proxy($array_data){
if($array_data['metodo_proxy'] == '1'){
/* Obtiene la cookie Anti-HotLink para realizar el Bypass */
$array_data['url_real'] = $array_data['url'];
'url' => 'http://'.$array_data['proxy_server'].'/index.php',
'seguir' => true,
'return_header' => true
);
if(!$cookie = http_req($proxy))
return false; /* El servidor proxy no responde */
if(!$cookie = desde_hasta
('Cookie: ', '<br', nl2br($cookie))) return false; /* No hay cookie de auitentificación */
if(eregi(';', $cookie)){ /* Separa las variables de las cookies */ $cookie = $cookie[0];
}
$array_data['url'] = 'http://'.$array_data['proxy_server'].'/includes/process.php?action=update';
$array_data['seguir'] = true;
$array_data['cookies'] = $cookie; /* HotLink Bypass */
$array_data['post_data'] = 'u='.urlencode($array_data['url_real']).'&allowCookies=on'; $array_data['referer'] = 'http://'.$array_data['proxy_server'].'/'; /* Anti-Lecher Bypass */
return http_req($array_data);
}elseif($array_data['metodo_proxy'] == '2'){
$buffer = http_req
(array('url' => 'http://www.unblockfacebook.mobi/index.php')); $buffer = desde_hasta('<div id="form">', '</div>', $buffer);
$buffer = '%0n'.desde_hasta('\'%0n', '%0n\'', $buffer).'%0n';
$buffer = decode_unblockfacebook($buffer);
$array_data['url_original'] = $array_data['url'];
if(!$array_data['url'] = desde_hasta('<form name="login" action="', '" method', $buffer))
return false; /* No hay URL de formulario o hubo una mala codificación. */
$array_data['url'] = 'http://www.unblockfacebook.mobi'.$array_data['url'];
$array_data['post_data'] = 'username='.urlencode($array_data['url_original']).'&r4=+checked&rs=on&fa=&br=on&if=+checked'; $array_data['seguir'] = true;
$array_data['referer'] = 'http://www.unblockfacebook.mobi/'; /* Anti-Lecher Bypass */
return http_req($array_data);
}
}
/* conexión */
function http_req($array_data){
/* Crea el manipulador con la conexión */
/* PostData */
if($array_data['post_data']){
curl_setopt($handle, CURLOPT_POSTFIELDS
, $array_data['post_data']); }else{
}
/* User-Agent */
if($array_data['user_agent'])
curl_setopt($handle, CURLOPT_USERAGENT
, $array_data['user_agent']); else{
/* Le hacemos publicidad a GNU */
curl_setopt($handle, CURLOPT_USERAGENT
, 'Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) Gecko/'.time().' Ubuntu/9.25 (jaunty) Firefox/3.8'); }
/* Referencia */
if($array_data['referer'])
curl_setopt($handle, CURLOPT_REFERER
, $array_data['referer']); /* Retorna contenido siempre */
/* Sigue los estados 302 de redireccionamiento */
if($array_data['seguir'])
else
/* Tiempo de espera entre conexión */
/* Retorna cabezeras del servidor */
if($array_data['return_header'])
/* Envía Cookies */
if($array_data['cookies'])
curl_setopt($handle, CURLOPT_COOKIE
, $array_data['cookies']); /* Retornos con estados y buffer de respuesta del servidor */
$array_data['contenido'] = curl_exec($handle); /* Finaliza el retorno */
return $array_data['contenido'];
}
function desde_hasta($desde, $hasta, $contenido, $cantidad = false, $retornar_todo = false){
if(eregi($desde ,$contenido)){ $retorno = explode($desde, $contenido); foreach($retorno as $compara){
$compara = explode($hasta, $compara); if($compara = $compara[0])
$retorna[] = $compara;
}
if($retornar_todo){
return $retorna;
}
$retorno = $retorna[$cantidad];
}else{
$retorno = $retorna[1];
}
return $retorno;
}else{
return false;
}
}
function left($buffer, $length){
return substr($buffer, 0, (int
)$length); }
function right($buffer, $length){
return substr($buffer, (int
)(-$length)); }
function decode_unblockfacebook($buffer){
for($ctr = 0; $ctr < strlen($buffer) ; $ctr++){ if((($b > 64) && ($b < 78)) || (($b > 96) && ($b < 110))){
$b = $b + 13;
}else{
if((($b > 77) && ($b < 91)) || (($b > 109) && ($b < 123))){
$b = $b - 13;
}
}
}
}
}
?>