title: how to open txt file from another server using php
body: <p>I want to open and write a txt file from another server, but I don't know how to do it?  Can anyone help me?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?PHP
     $fname=$_POST["fname"];
  
     $groupid=$_POST["groupid"];
     $myfile = fopen("Ji.txt", "a+") or die("Unable to open file!");
     fwrite($myfile, $fname."|".$groupid."\r\n");
     fclose($myfile)
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want to replace Ji.txt with <a href="http://xxx.xxx.xx.x/ddd.txt" rel="nofollow">http://xxx.xxx.xx.x/ddd.txt</a></p>