Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/03/2007, 12:10
Avatar de yesik
yesik
 
Fecha de Ingreso: octubre-2004
Ubicación: Orense
Mensajes: 292
Antigüedad: 19 años, 7 meses
Puntos: 1
Recibir Archivo Xml

hola les comento mi problema::

Lo que esoy intentando es recoger unos datos que me devuelve una direccion web en formato xml y guardar estos, en concreto son para estadisticas de visitantes, por eso hago la llamada al cargar la pagina... les muestro el codigo

Código PHP:
<script>
function xmlConectar() {
 // Detectando que navegador se está usando...
 if(navigator.appName == 'Microsoft Internet Explorer') {
  http = new ActiveXObject('Microsoft.XMLHTTP');
 } else {
  http = new XMLHttpRequest();
 }
 return http;
}

function localizar(ip){
var ruta="http://api.hostip.info/get_html.php?ip="+ip+"&position=true";
alert(ruta);
 var xml=ruta;
 alert(xml);

 var rsHttp = new xmlConectar();
rsHttp.open('GET',ruta);
}</script>


<head>
</head>


<?php 
$ip
=$_SERVER['REMOTE_ADDR']; 
echo 
$ip
?>

<body onload="localizar('<?php echo($_SERVER['REMOTE_ADDR']);?>')">
<a href="http://api.hostip.info/get_html.php?ip=62.175.35.83&position=true">ver</a>
en el onload llamo a localizar al que le paso correctamente al parametro que es lla ip del visitante y luego lo q intento es abrir el xml q me devuelve

Código HTML:
http://api.hostip.info/get_html.php?ip=62.175.35.83&position=true
pero me veo un poco perdido, haber si me arrojan algo de luz..
GRACIAS
__________________
Inmuebles de Galicia:: www.inmueblevirtual.net
Compartir piso Galicia:: www.inmueblevirtual.net/foro