Curl is library that for making HTTP requests.

AppEngine has a different library - URL Fetch - which has been intergrated
into the standard PHP wrappers.

The code should be converted to use standard php functions instead.

See:
https://developers.google.com/appengine/docs/php/urlfetch/

The function GetAsJson could be rewritten as something like

 function GetAsJson($url) {
    $data = file_get_contents($url);
    foreach ($http_response_header as $header_line)
        if (preg_match('/^HTTP\/\d.\d (\d+)/,$header_line,$match))
              $http_status = intval($match[1]);
    return array($http_status, json_decode($data));
}

getting the data itself is as simple as using file_get_contents, but
getting the status code is a little more tricky.

On 21 September 2014 05:26, Kseniya Andryushyna <
[email protected]> wrote:

> Hi,
> I'm pretty new to programing all together and PHP in particular, so I
> apologize if my question sound stupid.
>
> I want to write an app that will use Maps Engine API. I've installed Apps
> Engine PHP SDK, gone through all registrations and so on.
> The 1st example
> <https://developers.google.com/maps-engine/documentation/hello-world#php>
> shown in Map Engine page is not running in PHP Runtime. I receive an error: 
> Call
> to undefined function curl_init(). From bits of information that I found
> and understood it looks like cURL library is not installed.
> Could you please help me to understand if my assumption is true and if it
> is - advise how to install the library?
>
> Thanks
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/google-appengine.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/d/optout.

Reply via email to