Certification Example in PHP

Created by Alison Gianotto, Modified on Fri, 5 Feb, 2021 at 2:55 PM by Alison Gianotto

Here’s a sample of PHP code to Certify a verification:


$hostname = "https://api.goodforms.com";

$options  = array('http' => array('user_agent' => 'YourUserAgent/0.1'));
$context  = stream_context_create($options);

$raw_results = file_get_contents($hostname."/certify?apikey=".private_key()."&email=".urlencode($_REQUEST['email'])."&goodforms_checksum=".urlencode($_REQUEST['goodforms_checksum']), false, $context);
if($raw_results === false) {
    print '<div>ERROR DOING GET!</div>';
}
$parsed_results = json_decode($raw_results);



If the returned “status” is “success” (e.g. the results are: {"status": "success"}, then the certification was successful. You cannot certify the verification more than once.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article