Source: site.view [edit]
Function name: yahooLogin
Arguments:
Description: Logs into Yahoo, allowing subsequent access to pages such as egroups, etc. (cookies saved in cookiedb by user). Set vault values for "yahooUserName" and "yahooPW".
Page type: webl
Render function:  
Module: siteutil

Page source:

var res = false;
if (wubinfo.user != nil) then

   var P = GetURL("http://login.yahoo.com/config/login?.intl=us",
       nil, nil, [. cookiedb=wubinfo.user .] );

   // Grab all mystical hidden input arguments to form
   var F = Elem(P, "form")[0];
   var Inputs = Elem(P, "input") inside F;

   var args = [. .];
   every i in Inputs do
      var name = (i.name ? nil);
      var value = (i.value ? nil);
      if (name != nil) and (value != nil) then
         args[name] := value;
      end;
   end;

   // fill in username and pw -- each user must have saved 
   //   yahooUserName and yahooPW in password vault
   args["login"] := Wub_GetVaultValue("yahooUserName");
   args["passwd"] := Wub_GetVaultValue("yahooPW");

   // Login
   P = (PostURL(F.action, args, nil, [. cookiedb=wubinfo.user .]) ? nil);

   if P != nil then
      if Size(Pat(P, `ou are seeing`)) > 0 then
         res = true
      end
   end
end;
res;