Get content from a url using php
<p>I want to get the dynamic contents from a particular url:</p>

<p>I have used the code </p>

<pre><code>echo $content=file_get_contents('http://www.punoftheday.com/cgi-bin/arandompun.pl');
</code></pre>

<p>I am getting following results:</p>

<pre><code>document.write('"Bakers have a great knead to make bread."

') document.write('© 1996-2007 Pun of the Day.com
')
</code></pre>

<p>How can i get the string  <strong>Bakers have a great knead to make bread.</strong>
Only string inside first document.write will change, other code will remain constant</p>

<p>Regards,</p>

<p>Pankaj</p>
