• hello I would like to send data to a server via get via curl and have the response output to me.

    No problem by post, but it doesn’t really work with get. Does somebody has any idea?

    // My url
    $url = "https://mydomain/index.php?packageID=".$response['packageID']."&weight=".$response['weight']."&length=".$response['length']."&width=".$response['width']."&height=".$response['height']."";
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url); 
    curl_setopt($ch, CURLOPT_HEADER, true); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
    $data = curl_exec($ch);

    I would have to get this back as a response


  • is working

    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    //for debug only!
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    $resp = curl_exec($curl);
  • Topic has been marked as a question  RiekMedia RiekMedia 
  • Topic has been marked as solved  RiekMedia RiekMedia 

If this topic and the associated threads resolved an issue for you, or was useful, why not buy me a coffee? It's a nice gesture, and there's other ways to donate if you wish 💗

Discover More

  • 8
  • 5
  • 24
  • 33
  • 13
  • 2
  • 4
  • 12