elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.
 
Inicio Ayuda Buscar Ingresar Registrarse
29 Mayo 2012, 07:02  


Tema destacado: ¿Eres nuevo? ¿Tienes dudas acerca del funcionamiento de la comunidad? Lee las Reglas Generales

+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting (Moderadores: Novlucker, Leo Gutiérrez., EleKtro H@cker)
| | |-+  CURL para actualizar Tuenti (PHP)
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: CURL para actualizar Tuenti (PHP)  (Leído 276 veces)
pato3_3

Desconectado Desconectado

Mensajes: 3


Ver Perfil
CURL para actualizar Tuenti (PHP)
« en: 2 Febrero 2012, 13:30 »

Estoy intentando actualizar Tuenti con Curl, pero lo único que consegui fue que el servidor me dijera que no actualizaba porque le parecia sospechoso.
Codigo:
Código
<?php
$handler = curl_init();
curl_setopt($handler, CURLOPT_POST, false);
curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/?m=login");
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handler, CURLOPT_FRESH_CONNECT, true);
curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
$prueba = curl_exec($handler);
$handler = curl_init();
curl_setopt($handler, CURLOPT_POST,true);
curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/?m=login&func=process_login");
curl_setopt($handler, CURLOPT_POSTFIELDS,"tuentiemail=EMAILDETUENTI&password=PASSWORDDETUENTI");
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handler, CURLOPT_FRESH_CONNECT, true);
curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
$prueba = curl_exec($handler);
$handler = curl_init();
curl_setopt($handler, CURLOPT_POST,false);
curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/");
curl_setopt($handler, CURLOPT_USERAGENT,"Mozilla/5.0 (Linux; U; Android 2.2; en-us; T-Mobile G2 Build/FRF91) AppleWebKit/533.1(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
curl_setopt($handler, CURLOPT_HTTPHEADER, array("Accept-Language: es-es,es;q=0.8", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Proxy-Connection: keep-alive", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3"));
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handler, CURLOPT_FRESH_CONNECT, true);
curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
$prueba = curl_exec($handler);
preg_match('/(csfr=)([a-zA-Z0-9]{8})/', $prueba, $total);
$texto = urlencode("ñ");
$handler = curl_init();
curl_setopt($handler, CURLOPT_POST,true);
curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/?m=Profile&f=processSetStatus&csrf=$total[2]");
curl_setopt($handler, CURLOPT_USERAGENT,"Mozilla/5.0 (Linux; U; Android 2.2; en-us; T-Mobile G2 Build/FRF91) AppleWebKit/533.1(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1");
curl_setopt($handler, CURLOPT_HTTPHEADER, array("Content-Type: application/x-www-form-urlencoded","Content-Length: 23","Host: m.tuenti.com","Accept-Language: es-es,es;q=0.8", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Proxy-Connection: keep-alive", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3"));
curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handler, CURLOPT_REFERER, "http://m.tuenti.com/?m=Profile&f=processSetStatus&csrf=$total[2]");
curl_setopt($handler, CURLOPT_POSTFIELDS,"from=Home&status=$texto");
$response = curl_exec($handler);
echo $response;
?>
Alguien sabe como arreglarlo?


En línea
Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
cron cURL para Windows
Windows
Ensy 2 961 Último mensaje 19 Junio 2007, 13:14
por Ensy
Tuenti: Realizar búsquedas sin tener Tuenti ni estar logeado
Desarrollo Web
dimitrix 4 5,768 Último mensaje 24 Enero 2010, 12:14
por dimitrix
Autenticación con CURL en Tuenti.
GNU/Linux
swinman 0 750 Último mensaje 23 Marzo 2010, 22:59
por swinman
Autenticación en Tuenti mediante Curl
Scripting
swinman 1 2,002 Último mensaje 26 Marzo 2010, 10:48
por kamsky
Inconveniente para mostrar imágenes obtenidas con cURL
PHP
4rkn63l 3 857 Último mensaje 29 Noviembre 2011, 03:29
por 4rkn63l
Powered by SMF 1.1.16 | SMF © 2006-2008, Simple Machines