0

I currently have a simple google script I wrote, published it as a web app, and I set the app to execute as myself, and I allowed anyone within my domain to run the app.

function doGet() {
    return ContentService.createTextOutput("Hello World");
}

And I'm attempting to call this Google Script using cURL in my PHP page as follows:

<?php
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'google web app script link'); 
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 20);

    $result=curl_exec($ch);

    if(curl_error($ch))
    {
        echo 'error: ' . curl_error($ch);
    }
    else
    {
        echo $result;
    }

    curl_close($ch);
?>

When I go to test this code, I am getting the error: SSL certificate problem: unable to get local issuer certificate

Thanks to whoever can help.

Russ B
  • 35
  • 6

0 Answers0