Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4062586
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:37:02+00:00 2026-05-20T15:37:02+00:00

Here is my code: public function geocode($address){ $a = urlencode($address); $geocodeURL = http://maps.googleapis.com/maps/api/geocode/json?address=$a&sensor=false; $ch

  • 0

Here is my code:

public function geocode($address){
        $a = urlencode($address);
        $geocodeURL = "http://maps.googleapis.com/maps/api/geocode/json?address=$a&sensor=false";
        $ch = curl_init($geocodeURL);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        curl_close($ch);

        if ($httpCode == 200) {
                $geocode = json_decode($result);
                $lat = $geocode->results[0]->geometry->location->lat;
                $lng = $geocode->results[0]->geometry->location->lng;
                var_dump($lat);
                var_dump($lng);
                //return this->getClosest($lat, $lng);
        } else {
                $geo_status = "HTTP_FAIL_$httpCode";
                //return -1;
        }

   }


    public function executeGet()
    {
        global $my_neighbor_lists;
        $valid = $this->hasRequiredParameters($this->requiredParams);
        if ($valid instanceof Frapi_Error) {
            return $valid;
        }

        $origin_address = $this->getParam('origin', self::TYPE_STRING));
        $this->geocode($origin_address);
    }

Why is it giving me a 500 HTTP error… is there some syntax that I am missing? Commenting the call to geocode removes this ERROR

Here’s my error log:

2011/03/12 19:58:32 [error] 9966#0: *4555 FastCGI sent in stderr: “PHP Fatal error: Call to undefined function curl_init() in /var/www/api/src/frapi/custom/Action/Find_route.php on line 128” while reading response header from upstream, client: 70.176.18.156, server: api.frapi, request: “GET /route.printr?origin=1510%20E.%209th%20Street,%20Tucson,%20AZ&destination=32%20North%20Campbell%20Avenue,%20Tucson,%20AZ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9000”, host: “api.adasherasdasbang.me”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:37:03+00:00Added an answer on May 20, 2026 at 3:37 pm

    This means that cURL isn’t installed on your system.

    You probably just need to enable the module in your php.ini. See http://www.php.net/manual/en/curl.installation.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

See here: http://code.google.com/p/ie7-js/ Does anyone have any experience or remarks about this javascript? Is
here is my example code: Public Class Parent Private _TestProperty As String Private WithEvents
What did I do wrong? Here is an excerpt from my code: public void
Using the obsolete System.Web.Mail sending email works fine, here's the code snippet: Public Shared
Here is a VB.NET code snippet Public Class OOPDemo Private _strtString as String Public
Here is the code currently used. public String getStringFromDoc(org.w3c.dom.Document doc) { try { DOMSource
Ok, here is the code and then the discussion follows: public class FlatArrayList {
So here is the simple code: [System.ComponentModel.DefaultValue(true)] public bool AnyValue { get; set; }
I have seen the following code: [DefaultValue(100)] [Description(Some descriptive field here)] public int MyProperty{...}
so here's a cut down version of my code: class lookAClass { public $pageTitle;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.