Skip to content

Instantly share code, notes, and snippets.

@hasantayyar
Created February 29, 2012 09:46
Show Gist options
  • Save hasantayyar/1939501 to your computer and use it in GitHub Desktop.
Save hasantayyar/1939501 to your computer and use it in GitHub Desktop.
get radom commit message from whatthecommit
<?php
$content = file_get_contents("http://whatthecommit.com/");
preg_match("#<p>(.*)#i",$content,$match);
$message = $match[1];
echo $message;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment