• Resolved zuchowra

    (@zuchowra)


    When this code is executed. What string is sent to the api…basically what is curl outputting ? I need to know the how the syntax is written for one of my solutions im developing. For Ex. http://mywebsite.com?slm_check=43565473435 <— I know this isn’t how its written but just to give you an example of what i mean. Appreciate your help.

    <?php
    /*** Mandatory data ***/
    // Post URL
    $postURL = “http://mywebsite.com&#8221;;
    // The Secret key
    $secretKey = “43565473435”;

    /*** Optional Data ***/
    //$firstname = “John”;
    //$lastname = “Doe”;
    //$email = “john.doe@gmail.com”;

    // prepare the data
    $data = array ();
    $data[‘secret_key’] = $secretKey;
    $data[‘slm_action’] = ‘slm_check’;
    $data [‘license_key’] = ’57f6b61dd31a2′;

    // send data to post URL
    $ch = curl_init ($postURL);
    curl_setopt ($ch, CURLOPT_POST, true);
    curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
    $returnValue = curl_exec ($ch);
    // Process the return values
    print_r($returnValue);
    ?>

    • This topic was modified 7 years, 6 months ago by zuchowra.
Viewing 1 replies (of 1 total)
  • Plugin Author mra13

    (@mra13)

    Its a standard HTTP POST. It doesn’t output any URL.

    You can use HTTP GET too (I think you are trying to use that one). Read up on how to send a HTTP POST or GET request and that will help you.

Viewing 1 replies (of 1 total)
  • The topic ‘How Is The URL String Output To the API’ is closed to new replies.