Why I can't get javascript values into my php5 code? : <p>I have this code: </p>

<pre><code>&lt;?php       $html=file_get_contents('testmaker_html.html');
        echo $html;
?&gt;



&lt;script type="text/javascript"&gt;


    document.getElementById('save_finaly_TEST').addEventListener("click", function(){
        cover = document.getElementById('cover').value;
        keywords = document.getElementById('keywords').value.split(",");

        notificationAboutElement = "Ok!";
        notifyMe(notificationAboutElement);
      html_saver();

    &lt;?php $test_html = "&lt;script&gt;document.write(html)&lt;/script&gt;"?&gt;   


    }); 

&lt;/script&gt;
&lt;?php 
        $new_test = rand().".html";
        $myfile = fopen($new_test, "w") or die("Unable to create file!");
        write($myfile, $test_html)  or die("Can't write to file");
        fclose($myfile)  or die("Can't close the file!");
        echo $new_test;
?&gt;


&lt;script type="text/javascript"&gt;
    console.log("$test_html: " + &lt;?php echo $test_html; ?&gt;);
    console.log("$new_test: " + &lt;?php echo $new_test; ?&gt;);
&lt;/script&gt; 
</code></pre>

<p>Why is  <code>$test_html</code> empty? I know the php and javascript is not on same server but this methodd to get values many times worked for many people. Than what can be wrong with this?</p>
