$variable = "Danny Tuppeny";
$variable = str_replace("Tup", "Put", $string);
echo $variable;
would output Danny Putpeny!
It goes through tha variable you give it (the last arguement), and replace the first arguement/string with the second.
You could suck the file into a variable (say $contents), and do:
$contents = str_replace('<FORM ACTION="http://www.theirdomain.com">', '<FORM ACTION="http://www.yourdomain.com">', $contents);
But theirdomain bit would be the line copied from their page (has to match exactly).
If you'll be doing it on more than one page (eg. the ACTION part isn't the same on all forms), you'd have to use regex to catch it. If it's just the one page, you don't.
HTH,
Danny
http://MyBest50.com