ESUPSGC

Arborescence des pages

Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

...

  1.  Firewall  ouvert port 8080  correspondant  au connecteur  http  tomcat
  2.  Rajouter l"adresse IP du client fichier security.properties 

    Bloc de code
    languagexml
    accessRestrictionWSRestPhoto=hasIpAddress('127.0.0.1')
    or  hasIpAddress
     or  hasIpAddress('ip serveur') or ...




  • Exemple PHP

     le plugin  CURL doit être rajouté dans le php.ini

...

Bloc de code
languagephp
titlethumbnail.php
<?php
extract($_GET);
Header("Content-type: image/jpeg");
$url = 'http://esup-sgc.univ-ville.fr:8080/wsrest/photo/'.$eppn$code.'/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;
?>


...

Bloc de code
titleUtilisation dans un report oracle
select get_photo ( 'http://esup-sgc.univ-ville.fr:8080/wsrest/photo/toto@univ-ville.fr/restrictedPhoto?cardEtat=ENABLED') photo , .....