elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  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 2,040 veces)
pato3_3

Desconectado Desconectado

Mensajes: 3


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

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
  1. <?php
  2. $handler = curl_init();
  3. curl_setopt($handler, CURLOPT_POST, false);
  4. curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
  5. curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
  6. curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/?m=login");
  7. curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
  8. curl_setopt($handler, CURLOPT_FRESH_CONNECT, true);
  9. curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
  10. $prueba = curl_exec($handler);
  11. $handler = curl_init();
  12. curl_setopt($handler, CURLOPT_POST,true);
  13. curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
  14. curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
  15. curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/?m=login&func=process_login");
  16. curl_setopt($handler, CURLOPT_POSTFIELDS,"tuentiemail=EMAILDETUENTI&password=PASSWORDDETUENTI");
  17. curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
  18. curl_setopt($handler, CURLOPT_FRESH_CONNECT, true);
  19. curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
  20. $prueba = curl_exec($handler);
  21. $handler = curl_init();
  22. curl_setopt($handler, CURLOPT_POST,false);
  23. curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
  24. curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
  25. curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/");
  26. 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");
  27. 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"));
  28. curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
  29. curl_setopt($handler, CURLOPT_FRESH_CONNECT, true);
  30. curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
  31. $prueba = curl_exec($handler);
  32. preg_match('/(csfr=)([a-zA-Z0-9]{8})/', $prueba, $total);
  33. $texto = urlencode("ñ");
  34. $handler = curl_init();
  35. curl_setopt($handler, CURLOPT_POST,true);
  36. curl_setopt($handler, CURLOPT_COOKIEJAR,"cookie.txt");
  37. curl_setopt($handler, CURLOPT_COOKIEFILE,"cookie.txt");
  38. curl_setopt($handler, CURLOPT_COOKIESESSION, "cookie.txt");
  39. curl_setopt($handler, CURLOPT_URL, "http://m.tuenti.com/?m=Profile&f=processSetStatus&csrf=$total[2]");
  40. 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");
  41. 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"));
  42. curl_setopt($handler, CURLOPT_RETURNTRANSFER, true);
  43. curl_setopt($handler, CURLOPT_REFERER, "http://m.tuenti.com/?m=Profile&f=processSetStatus&csrf=$total[2]");
  44. curl_setopt($handler, CURLOPT_POSTFIELDS,"from=Home&status=$texto");
  45. $response = curl_exec($handler);
  46. echo $response;
  47. ?>
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
Autenticación en Tuenti mediante Curl
Scripting
swinman 1 4,012 Último mensaje 26 Marzo 2010, 10:48 am
por kamsky
Tuenti lanza Tuenti Páginas
Noticias
wolfbcn 2 2,550 Último mensaje 5 Mayo 2010, 19:42 pm
por Feel1T
Inconveniente para mostrar imágenes obtenidas con cURL
PHP
4rkn63l 3 3,640 Último mensaje 29 Noviembre 2011, 03:29 am
por 4rkn63l
Hacer cURL en respuesta de cURL para posterior scraping.
PHP
goditozor 3 4,502 Último mensaje 1 Septiembre 2014, 20:32 pm
por WHK
[C++]Cpr - cURL para humanos
Programación C/C++
Poyoncio 8 3,678 Último mensaje 16 Septiembre 2016, 22:15 pm
por ivancea96
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines