title: Create a Jira Issue Using PHP and curl
body: <p>I have recently started working with Jira and am trying to make a web based form on my customer client portal that will allow people to enter issues. </p>
  
  <p>From my searching I have found the API examples Jira provides: <a href="https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue" rel="nofollow noreferrer">https://developer.atlassian.com/jiradev/jira-apis/jira-rest-apis/jira-rest-api-tutorials/jira-rest-api-example-create-issue</a></p>
  
  <p>However this uses something alone these lines:</p>
  
  <pre><code>curl -D- -u fred:fred -X POST --data {see below} -H 
  "Content-Type: application/json" http://localhost:8090/rest/api/2/issue/
  </code></pre>
  
  <p>However curl is something I have never used before. I have it configured in on my server to work (did a basic test to ensure it does). But I feel like this setup is not how it works for PHP.</p>
  
  <p>Online I find it says to break the curl into parts like this:</p>
  
  <pre><code>$curl = curl_init();
  curl_setopt($curl, CURLOPT_USERPWD, "$username:$password");
  curl_setopt($curl, CURLOPT_URL, $url);
  </code></pre>
  
  <p>but I am very unsure how I would break that command into it... also unsure how I would receive the data it is supposed to return (From the sites example): </p>
  
  <pre><code>{
     "id":"39002",
     "key":"TEST-103",
      "self":"http://localhost:8090/rest/api/2/issue/TEST-103"
  }
  </code></pre>
  
  <p>Any tips for going about creating an issue in PHP like this would be fantastic. Thanks.</p>