In order to solve a problem of insecure iframe content on my secure site, I'm trying to fetch a page using php, manipulate the HTML output and embed the content securely. Problem is, I can't figure out how to replace more than one specific string in the output. Here's my php code:
<?php
function makeachange($string)
{
return str_replace("oldstring", "newstring", $string);
}
$page = file_get_contents('http://website.com');;
echo filter_var($page, FILTER_CALLBACK,
array("options"=>"makeachange"));;
?>
Do I make another function, or can I add other changes I want to make in the «makeachange» function?