Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/10/2015, 10:35
Avatar de gogupe
gogupe
 
Fecha de Ingreso: octubre-2006
Ubicación: Mallorca
Mensajes: 897
Antigüedad: 17 años, 6 meses
Puntos: 32
Respuesta: Enviar archivo por POST a una URL

Vale, he cambiado a otro hosting que tengo y ahora no me da ningún mensaje, pero es que tampoco me dice nada, la pantalla en blanco, el código que uso es muy simple:

Código PHP:
<?php
$ch 
curl_init();
$file"/overseasSendProperty.json";
$post = array('file' => '@'.$file);

curl_setopt($chCURLOPT_HEADER0);
curl_setopt($chCURLOPT_VERBOSEfalse);
curl_setopt($chCURLOPT_URL'https://adfapi.adftest.rightmove.com/v1/property/overseassendpropertydetails ');

curl_setopt($chCURLOPT_BINARYTRANSFER1);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($chCURLOPT_POSTtrue);
curl_setopt($chCURLOPT_POSTFIELDS$post);

$r curl_exec($ch);
print_r($r);
?>
Al final hay un print_r, al menos debería retornar algún dato... estoy haciendo algo mal?

Gracias.
__________________
Somos una serie de acontecimiento que puede venir al caso en un momento dado.