ESUPSGC

Arborescence des pages

Vous regardez une version antérieure (v. /wiki/spaces/SGC/pages/1052016642/Utilisation+des+API+REST+pour+r%C3%A9cup%C3%A9ration+des+photos+Universit%C3%A9+de+Limoges) de cette page.

afficher les différences afficher l'historique de la page

« Afficher la version précédente Vous regardez la version actuelle de cette page. (v. 4) afficher la version suivante »



Pré-requis :

  1.  Firewall  ouvert port 8080
  2.  Rajouter l"adresse IP du client fichier security.properties  accessRestrictionWSRestPhoto=hasIpAddress('127.0.0.1') or  hasIpAddress('ip serveur') or ...



  • Exemple PHP

Programme appelant
print "<img src=\"thumbnail.php?code=".$eppn."\"  width=125 height=150>";

thumbnail.php
<?php
extract($_GET);
Header("Content-type: image/jpeg");
$url = 'http://site.xxxxxx.fr:8080/wsrest/photo/'.$eppn.'/restrictedPhoto?cardEtat=ENABLED';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.1 Safari/537.11');
$res = curl_exec($ch);
$rescode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch) ;
echo $res;
exit;
?>




  • Exemple SQL ORACLE


  • Aucune étiquette