Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/08/2009, 23:48
Suyta
(Desactivado)
 
Fecha de Ingreso: septiembre-2004
Mensajes: 360
Antigüedad: 19 años, 7 meses
Puntos: 1
Respuesta: simplexml_load_file()

mmmmmmmmmmmmm no le entiendo al simplexml_load_file()
al menos con el formato que envía ebay.

Me resulta más fácil así:

Código PHP:
<?php

$url
="http://svcs.ebay.com/MerchandisingService?OPERATION-NAME=getMostWatchedItems&SERVICE-NAME=MerchandisingService&SERVICE-VERSION=1.1.0&CONSUMER-ID=YOUR_APPI_KEY&RESPONSE-DATA-FORMAT=XML&categoryId=397";


$str=file_get_contents($url);


if(
preg_match_all('/\<title\>([\w\W]*?)\<\/title\>/'$str$match)){
foreach(
$match[1] as $value
{   
        print 
$value."<br>";         
           
}   
}
?>
Gracias a todos !

Última edición por GatorV; 28/08/2009 a las 10:17