Having trouble create a .php file with PHP

I am trying to create a .php file in a specific directory using fopen() and fwrite(). Here is what I have:

$ourFileName = $url ."/index.php";
$fh = fopen($ourFileName, 'w') or die("can't open file");
$stringData="<?
$fuse=$_GET['fuse'];
if($fuse==\"\"){
?>
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 7;
var plugin = (navigator.mimeTypes && navigator.mimeTypes[\"application/x-shockwave-flash\"]) ? navigator.mimeTypes[\"application/x-shockwave-flash\"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins[\"Shockwave Flash\"].description.split(\" \");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words*)))
continue;
var MM_PluginVersion = words*; 
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf(\"MSIE\")>=0 
&& (navigator.appVersion.indexOf(\"Win\") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> 
'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next 
');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" & MM_contentVersion)))
');
document.write('</SCR' + 'IPT\> 
');
}
if ( MM_FlashCanPlay ) {
window.location.replace(\"index.php?fuse=flash\");
} else{
window.location.replace(\"index.php?fuse=html\");
}
//-->
</SCRIPT>
<?
}else{
header(\"Location: https://www.oclawyerstitle.com/rep.php?id=". $id ."&fuse=$fuse\");
}
?>";
fwrite($fh, $stringData);
fclose($fh);

The variable “id” is the only thing dynamic, and it is defined before all this.

When I run this I get this error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/.hefner/landam2/oclawyerstitle.com/input.php on line 60

Line 60 = "$fuse=$_GET[‘fuse’];"

Thank you for your help in advance. :trout: