To get the data you want from example.com would be a two stage process. Firstly, you could get the whole page via curl request. Curl can request pages just like a web browser, and return the input to a variable.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://example.com");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// $output is the requested page's source code
$output = curl_exec($ch);
curl_close($ch);
Secondly, you could take your new variable and isolate the part that you want for your site.
// Start and end of string
$start_char = '<h1>';
$end_char = '</h1>';
// Find the first occurrence of each string
$start_pos = strpos($output, $start_char);
$end_pos = strpos($output, $end_char);
// Exclude the start and end parts of the string
$start_pos += strlen($start_char);
$end_pos += strlen($end_char);
// Get the substring
$string = substr($output, $start_pos, ($end_pos - $start_pos));
exit($string);
Disclaimer, this isn't the best way to approach the issue, an API would be ideal, be aware that both your server and the server you're requesting will see a lot more usage in this configuration.