Getting Results from an url with sending it url variables
<p>i need to send get command and take it's results. Sorry about my bad english.<br>
i need to get result from a file whish sended url parameters
for example:</p>

<pre><code>&lt;?php

$adata["command1"] = "testcommand1";
$adata["command2"] = "testcommand2";
$getresult = sendGetCommand("https://website.com/api.html", $arrayofdata);

echo "["; // for json data;

$arrayresult = explode("\n",$getresult);
foreach ($getresult in $line) {
  $arrayline = explode("\n",$line);
   echo "{ ";
  foreach ($arrayline in $cmdid =&gt; $cmd) {
    echo "'".$cmdid."' : '".$cmd."',";
  }
  echo "{";
}
?&gt;
</code></pre>

<p>somethink like this..</p>

<p>url is like:<br>
 "https://website.com/api.html?command1=testcommand1&amp;command2=testcommand2"  </p>

<p>url result is like:</p>

<hr>

<p>command1,testcommand1,,yes<br>
 command2,testcommand2,,error,error text here</p>

<hr>

<p>i'll explode the data line by line and then get the data from JavaScript
 this is a domain search api.</p>

<p>another question:
explode("\n",$string) can be used for read it line by line? (windows os)</p>
