Page 1 of 1

[Help]extract. regex?

Posted: Wed Aug 19, 2009 12:10 pm
by Pidgeon
Hi, I'm new to PHP and have actually only been playing with it for a day. This is probably incredibly simple but i'm not too sure where i'm going wrong.

I want to get the random quote from: http://smacie.com/randomizer/
Heres my attempt:

Code: Select all

 
      <?php
      $file = file_get_contents("http://smacie.com/randomizer/blah.html")
preg_match("/big>(.*)<\/font>/",$file,$quote);
echo $quote[1];
      ?>