how to get file from url php code example
Example 1: php get file contents
<?php
file_get_contents("file.txt");
?>
Example 2: download html content from url php
$c = curl_init('https://yourURLhere.com');
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
//curl_setopt(... other options you want...)
$html = curl_exec($c);
if (curl_error($c))
die(curl_error($c));
// Get the status code
$status = curl_getinfo($c, CURLINFO_HTTP_CODE);
curl_close($c);