Skip to content

Instantly share code, notes, and snippets.

@davidreuss
Created July 17, 2009 17:47
Show Gist options
  • Save davidreuss/149197 to your computer and use it in GitHub Desktop.
Save davidreuss/149197 to your computer and use it in GitHub Desktop.
<?php
$contents = file_get_contents('http://nod123.cn/');
preg_match_all('/username:\s?([A-Za-z0-9-]+)/i', $contents, $usernames);
preg_match_all('/password:\s?([A-Za-z0-9-]+)/i', $contents, $passwords);
foreach ($usernames[1] as $key => $username) {
if (isset($passwords[1][$key])) {
printf("%s:%s\n", $username, $passwords[1][$key]);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment