Im grabbing a page with below.

$homepage = file_get_contents('http://www.example.com/');
echo $homepage;

How do I write it to a file.txt and overwite in the event the file exists ?

Thanks.

thank you. Yeah I was caught up on file_put_contents. Thanks again.