Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = file_get_contents("/.mozilla-thunderbird/nc756405.default/Mail/pop.gmail.com/Inbox");
- /*
- * Extract the list of user/passes in this email
- */
- $list_top = "registered to this e-mail address are:";
- $list_bottom = "If you continue to have trouble signing in";
- // I'm not to sure on \n in regex.. so replace them out for now
- $str = str_replace("\n", "~~n~~", $str);
- $arr = array();
- preg_match("/($list_top)(.*?)($list_bottom)/", $str, $arr);
- // Replace the \n back and trim it down for an array
- $list = str_replace("~~n~~", "\n", $arr[2]);
- $list = trim($list);
- // Wahey, the user/pass array :)
- $account_list_tmp = split("\n", $list);
- $account_list = array();
- foreach($account_list_tmp as $row){
- $user = split(" ", $row);
- $account_list[] = array($user[0], $user[1]);
- }
- foreach($account_list as $user){
- $user_name = $user[0];
- $user_pass = $user[1];
- // SAVE IT HERE
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement