title: how to view final url before submission curl php
body: <p>I want to know final url just before executing curl to check all parameters passing as desired. how to view that.</p>
  
  <pre><code>&lt;?PHP
  function openurl($url) {
      $ch=curl_init();
      curl_setopt($ch,CURLOPT_URL,$url);
      curl_setopt($ch, CURLOPT_POST, TRUE);
      curl_setopt($ch,CURLOPT_POSTFIELDS,$postvars);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
      curl_setopt($ch,CURLOPT_TIMEOUT, '3');
      $content = trim(curl_exec($ch));  
      curl_close($ch); 
      echo $content;
  }
  $postvars = array('user' =&gt; "user123",'password' =&gt; "user@user!123",'Text' =&gt; "Test");
  $sms_url ="http://remoteserver/plain";
  openurl($sms_url);
  ?&gt;
  
  desired output to check all params and its values passing correct..
  http://remoteserver/plain?user=user123&amp;password=user@user!123&amp;Text=TESThere
  </code></pre>