I need to get some text in a source of a webpage. The thing is the value is always random and it's somewhere in the middle of the source.
What I need to get is:
<input type="hidden" value="123456" name="extra">
Note: 123456 is always random
I've got this...
preg_match( '/^(.+?)<input type="hidden" value="([0-9]+)" name="extra">(.+?)$/m', file_get_contents( 'http://www.example.com' ), $content );
..., but it doesn't work. The $content array is always empty.
Help?