title: secure curl call - command line calls
body: <p>I am trying to develop a way for my customer to send me a curl request to get data from my server.  I need this to be psuedo-secure.  I would expect my customer to send me something, I authenticate him, and then wait for him to send me a request for data.  Something like </p>
  
  <pre><code> curl -O 1.2.3.4/curlRequest.php?username=Joe&amp;password=123456790
  </code></pre>
  
  <p>curlRequest.php would verify some credentials.  Clearly sending u/p over get is a terrible idea. any thoughts how i can go about this.  I am not asking anyone to write code for me, Im asking more for what procedures I could use to achieve my goal.</p>
  
  <p>my first thought is to send request 1 that would request some string:</p>
  
  <pre><code>  curl 1.2.3.4/authCurl.php?userName=Joe
  </code></pre>
  
  <p>using this and the fact that this request came from a known server, i can respond with a string:</p>
  
  <pre><code> 125tewgkljgetEDtstdkj
  </code></pre>
  
  <p>then all future requests must contain that string for the next X minutes:</p>
  
  <pre><code> curl -O 1.2.3.4/curlRequest.php?hash=125tewgkljgetEDtstdkj
  </code></pre>
  
  <p>is this a terrible idea? Any other options that you could recommend?</p>