Rev 69 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
/**
* PHP Version 5
*
* @category PHP
* @package papyrus_bp
* @author aurelien <aurelien@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
* @version SVN: <svn_id>
* @link /doc/papyrus_bp/
*/
Class ExecuteurLien extends JRestService {
public function getElement($uid){
if(isset($uid[0])) {
$lien_code = $uid[0];
$lien = base64_decode(str_replace('_','/',$lien_code));
} else {
return;
}
if(!isset($uid[1])) {
$retour_ajax = true;
} else {
$adresse_retour = base64_decode(str_replace('_','/',$uid[1]));
}
echo $lien;
exit;
$requete = file_get_contents($lien);
if($retour_ajax) {
if($requete) {
$resultat = 'ok';
} else {
$resultat = false;
}
$this->envoyer($resultat);
} else {
header('Location: http://'.$adresse_retour);
exit;
}
}
}
?>