title: How to use curl GET instead of POST
body: <p>I'm tyring to use curl to print a return from a url.  The code I have so far looks like this:</p>
  
  <pre><code>&lt;?php
      $street = $_GET['street'];
      $city = $_GET['city'];
      $state = $_GET['state'];
      $zip = $_GET['zip'];
  
      $url = 'http://eligibility.cert.sc.egov.usda.gov/eligibility/eligibilityservice';
      $query = 'eligibilityType=Property&amp;requestString=&lt;?xml version="1.0"?&gt;&lt;Eligibility xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/var/lib/tomcat5/webapps/eligibility/Eligibilitywsdl.xsd"&gt;&lt;PropertyRequest StreetAddress1="'.$street.'" StreetAddress2="" StreetAddress3="" City="'.$city.'" State="'.$state.'" County="" Zip="'.$zip.'" Program="RBS"&gt;&lt;/PropertyRequest&gt;&lt;/Eligibility&gt;';
      $url_final = $url.''.$url_query;
  
      $ch = curl_init();
  
      curl_setopt($ch, CURLOPT_URL, $url);
      curl_setopt($ch, CURLOPT_POST, 1);
      curl_setopt($ch, CURLOPT_POSTFIELDS,$query);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  
      $return = curl_exec ($ch);
      curl_close ($ch);
  
      echo $return;
  
  ?&gt;
  </code></pre>
  
  <p>the only obvious problem I know of it that the server being queried uses <code>GET</code> instead of <code>POST</code>.  Are there <code>GET</code> alternatives to this method?</p>