http://groups.google.com/group/Google-Maps-API/web/suggested-posting-guidelines


On Oct 20, 7:25 pm, Valerie <[EMAIL PROTECTED]> wrote:
> I use this script at least several times a week and it works well.
> I've copied and modified it to use with another database and I'm
> getting this error:
>
> [i]Fatal error: Call to undefined function: simplexml_load_file() in /
> home/hrrei0/public_html/thriftstorecentral/rungeocode.php[/i]
>
> Same server, different database and new populated table named markers.
>
> I'm stumped...
>
> [code]
> <?php
> include 'config.php';
> include 'opendb.php';
>
> define("MAPS_HOST", "maps.google.com");
> define("KEY", "ABQ#############");
>
> // Opens a connection to a MySQL server
> $conn = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD)
> or die
>    ('Error connecting to mysql');
> mysql_select_db(DB_NAME);
>
> // Select all the rows in the markers table
> $query = "SELECT * FROM markers WHERE lat <= '0'";
> $result = mysql_query($query);
> if (!$result) {
>   die("Invalid query: " . mysql_error());
>
> }
>
> // Initialize delay in geocode speed
> $delay = 0;
> $base_url = "http://"; . MAPS_HOST . "/maps/geo?output=xml" . "&key=" .
> KEY;
>
> // Iterate through the rows, geocoding each address
> while ($row = @mysql_fetch_assoc($result)) {
>   $geocode_pending = true;
>
>   while ($geocode_pending) {
>     $address = $row["address"];
>     $id = $row["id"];
>     $request_url = $base_url . "&q=" . urlencode($address);
>     $xml = simplexml_load_file($request_url) or die("url not
> loading");
>
> [/code]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to