Is there a way to verify client with curl?
<p>I'm making a client/server application with php.</p>

<p>The server takes an array serializes and echos the result.</p>

<p>the server could be hosted at www.site1.com/server.php</p>

<pre><code>echo serialize($array);
</code></pre>

<p>The client could be hosted at www.site2.com/client.php</p>

<pre><code>$ch = curl_init('http://www.site1.com/server.php');

curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

echo curl_exec($ch);
</code></pre>

<p>What I'm trying to do is to make server.php only echo the information iff the client is from www.site2.com/client.php.</p>

<p>Something like</p>

<pre><code>iff('Client is from www.site2.com/client.php'){
  echo curl_exec($ch)
} else {
  exit();
}
</code></pre>

<p>site2 does not have SSL</p>

<p>What variable do i look up, or is there a way to do this?</p>
