PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
What happens with this query (I have no idea why) is that when it gets to line 5 with the simpleXMLElement line, it kills the page and no code gets put on the page below this line when I view the source.
Warning: simplexml_load_file() [function.simplexml-load-file]: http://maps.google.com/maps/geo?q=Olava ... 9LYIDC3Q:1: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xED 0x61 0x2C 0x20 in /home/gamerbio/public_html/test.php on line 13
Warning: simplexml_load_file() [function.simplexml-load-file]: s><code>200</code><request>geocode</request></Status><Placemark><address>Olavarr in /home/gamerbio/public_html/test.php on line 13
Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /home/gamerbio/public_html/test.php on line 13
boolean
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 16
NULL
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 17
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 17
NULL
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 18
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 18
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 18
NULL
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 19
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 19
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 19
Notice: Trying to get property of non-object in /home/gamerbio/public_html/test.php on line 19
NULL
The google response should be utf-8 encoded but isn't.
It's about the í in Olavarría (í not i). In utf-8 it should be represented by two bytes:0xC3 0xAD (not 0xED as in latin-1).