Rev 5 | Rev 11 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5 | Rev 7 | ||
---|---|---|---|
Line 259... | Line 259... | ||
259 | do { |
259 | do { |
260 | $t = generateRandomString($length); |
260 | $t = generateRandomString($length); |
261 | } while (strpos($haystack, $t) !== false); |
261 | } while (strpos($haystack, $t) !== false); |
262 | return $t; |
262 | return $t; |
263 | } |
263 | } |
- | 264 | ||
- | 265 | function github_commit_count($user, $repo) { |
|
- | 266 | $cont = file_get_contents("https://github.com/$user/$repo"); |
|
- | 267 | if (preg_match('@>\s*(\d+)\s*</span>\s*commits@smU', $cont, $m)) { |
|
- | 268 | return $m[1]; |
|
- | 269 | } else { |
|
- | 270 | return "?"; |
|
- | 271 | } |
|
- | 272 | } |