Ver Mensaje Individual
  #4 (permalink)  
Antiguo 03/02/2011, 14:12
xmatrix
 
Fecha de Ingreso: febrero-2011
Mensajes: 6
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: como sacar info de url de itunes

por que mira lo que tengo hasta ahora es esto

Código PHP:
<?php
header
("Content-type: text/plain"); 
ini_set('display_errors', false);
$id='386171639';
if(isset(
$id))
{
 
$appID = (int)stripslashes($id);

 
$url = "http://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=" . $appID . "&mt=8";

 
$useragent = "iTunes/9.0.2 (Macintosh; Intel Mac OS X 10.5.8) AppleWebKit/531.21.8";
 
$header = array("X-Apple-Store-Front: 143441-1");

 
$ch = curl_init();
 
curl_setopt($ch, CURLOPT_URL, $url);
 
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
 
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
 
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
 
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);

 
$result = curl_exec($ch);

 
curl_close($ch); 

 echo 
$result;
}
?>