Sending leads from a site powered by PHP

To send leads in from a lead form's backend code, you would generate a POST string and execute the CURL function that would then send that string to the desired POST URL.

For Example (Using CURL):

    $c = curl_init();
    curl_setopt($c, CURLOPT_URL, '');
    curl_setopt($c, CURLOPT_POST, true);
    curl_setopt($c, CURLOPT_POSTFIELDS, 'FirstName=John&LastName=Doe&');
    curl_exec ($c);
    curl_close ($c);
In the example above, the example POST string is first generated and then is added to the CURLOPT_POSTFIELDS variable, curl_exec is then ran to send the information to the POST URL. The response is then received and would then be processed to determined the desired action depending on the sending page's requirements and method sent to.

More Information on CURL for PHP

Copyright ©2012