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 4382084
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:44:00+00:00 2026-05-21T12:44:00+00:00

Google Gears provides a geolocation API that can take LAC-CELLId information and supply lat-long

  • 0

Google Gears provides a geolocation API that can take LAC-CELLId information and supply lat-long data.
The API is detailed here: Geolocation API
I am using PHP. Here’s the code that I wrote:

<?php
$urlstring="http://www.google.com/loc/json";
$ch=curl_init($urlstring);

$cell_towers = array();
$row=new stdClass();
$row->location_area_code=3311;
$row->mobile_network_code=71;
$row->cell_id=32751;
$row->mobile_country_code=404;
$cell_towers[]=$row;    
$param = array(
      'host'=> 'localhost',
      'version' => '1.1.0', 
      'request_address' => true,
      'cell_towers' => $cell_towers
    );

$param_json=json_encode($param);    
//echo $param_json."<br />";
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,CURLOPT_POSTFIELDS,urlencode($param_json));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("application/jsonrequest"));
$result=curl_exec($ch);
echo $result;

?>

The response that I am getting is “JSON parsing error.”
What am I doing wrong?

  • 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-21T12:44:01+00:00Added an answer on May 21, 2026 at 12:44 pm

    Don’t urlencode. application/json bodies are never urlencoded.

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

Sidebar

Related Questions

I am developing a website that relies on pulling the geolocation data of a
Is it possible to get location data out of Google Gears , Google Gelocation
I don't want to have the user install Google Gears so I can show
Imagine a website that uses google gears as a storage mechanism for various application
Trying to upload files using Google Gears and ASP.NET... I assume you can as
Under the covers, Google Gears uses SQL Lite as its data store. Has anyone
With this code: var db = google.gears.factory.create('beta.database'); db.open('cominar'); db.execute('CREATE TABLE IF NOT EXISTS Ajax
I was pretty sure the answer was NO , and hence google gears, adobe
Google App Engine is a cloud computing architecture that supports java based web services
Google Maps API V3 doesn't support the V2 GOverviewMapControl option, yet. I've come across

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.