Comments (9)
Bonjour,
j'ai exactement le même problème mais je n'arrive même pas à faire fonctionner le "basic-fr.php". Aucun résultat retourné et ce Warning omniprésent.
Quelqu'un à une idée ?
from api-allocine-helper.
Ok, trouvé. Allociné a changé ses appels aux webservices ce qui rend obsoléte cette API. J'ai réussi à contourner le problème en changeant la méthode pour créer les URL de requête. Il faut simplement changer la méthode creatURL par celle-ci :
function creatURL($type) {
$this->set(array(
'format' => 'json',
'partner' => ALLO_PARTNER
));
$arTokens = array();
foreach ($this->getPresets() as $cle => $valeur) {
if (is_string($cle)) {
if (is_array($valeur)) {
$arTokens[$cle] = implode(',', $valeur);
} else {
$arTokens[$cle] = (string) $valeur;
}
} else {
$arTokens[$cle] = (string) $valeur;
}
}
$sed = date('Ymd');
$bDone = ksort($arTokens);
foreach($arTokens as $key => $value){
$arTokens[$key] = $key.'='.urlencode($value);
}
$sig = urlencode(base64_encode(sha1('e2b7fd293906435aa5dac4be670e7982'.implode('&',$arTokens)."&sed=$sed",true)));
et utiliser cette constante désormais :
define('ALLO_PARTNER', 'V2luZG93czg');
Je n'ai pu tester pour l'instant qu'avec une requête de type "movie" et cela fonctionne.
Pour le warning omniprésent, je pense que ce n'est absolument pas lié.
from api-allocine-helper.
Il vous faudra également utiliser cette fonction désormais :
protected function getDataFromURL($url) {
if (function_exists("curl_init")) {
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
$agents = array(
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0.1) Gecko/20100101 Firefox/7.0.1',
'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100508 SeaMonkey/2.0.4',
'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)',
'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; da-dk) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1'
);
curl_setopt($ch,CURLOPT_USERAGENT,$agents[array_rand($agents)]);
$data = curl_exec($ch);
} else {
if (!function_exists("file_get_contents")) {
$this->error("The extension php_curl must be installed with PHP or function file_get_contents must be enabled.", 1);
return false;
} else {
$data = @file_get_contents($url);
}
} if (empty($data)) {
$this->error("An error occurred while retrieving the data.", 2);
return false;
}
$data = @json_decode($data, 1);
if (empty($data)) {
$this->error("An error occurred when converting data.", 3);
return false;
} else {
return $data;
}
}
from api-allocine-helper.
Salut tout le monde !
Merci croustibapt pour ton code, je viens d'apprendre qu'il y avait un problème mais qu'il y a aussi une solution, ça fait plaisir ^^
Je m'occuperai de la source dans les prochains jours, à moins que tu ne veuilles faire une "pull request" de ton code, croustibapt ?
from api-allocine-helper.
Bonjour à tous,
Eventuellement un rand sur l'IP du demandeur peut être le bienvenue, à savoir :
$ip=rand(0,255).'.'.rand(0,255).'.'.rand(0,255).'.'.rand(0,255);
$headers[] = "REMOTE_ADDR: $ip";
$headers[] = "HTTP_X_FORWARDED_FOR: $ip";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
from api-allocine-helper.
J'ai pas encore tout tester mais déjà les fonctions movie() et tvseries() fonctionnent.
Je pense que c'est mieux d'attendre encore un peu de voir si tout tient la route et en rajoutant les idées des uns et des autres. Tu feras le tri de ce que tu juges utile comme ça.
from api-allocine-helper.
Pour info : http://www.siteduzero.com/forum/sujet/probleme-avec-l-api-d-allocine
Ca bouge tous les jours en ce moment.
from api-allocine-helper.
Bonjour a tous,
Je n'arrive toujours pas à accéder à l'API d'allociné via le Helper.
J'ai aussi fait le tour du site du zéro que Croustibapt a précisé mais rien.
Si quelqu'un peut m'aider. Merci
from api-allocine-helper.
Plop tout le monde.
La dernière version est en ligne :)
Merci à la personne qui m'a envoyé sa version modifiée de "api-allocine-helper-2.2.php" (et qui fonctionne) par mail !
from api-allocine-helper.
Related Issues (20)
- Erreur 3: An error occurred when converting data HOT 9
- utilisation de l api pour les séries HOT 2
- Les constantes ne sont pas pratiques
- param['filter'] probleme HOT 1
- Synopsis d'un film UTF-8 HOT 5
- Fatal error: Cannot access private property AlloHelper::$_lastError in api-allocine/AlloData.class.php on line 354 HOT 2
- Undefined property: AlloData::$throwExceptions HOT 6
- Liste de films HOT 1
- Original Title remonte "Mise à jour sur Google play" ! HOT 2
- Cannot access private property AlloHelper::$_lastError
- Erreur 403 avec search HOT 2
- Liste des ID (season) HOT 2
- episodelist HOT 1
- Intégration dans wordpress
- Erreur de syntaxe en ligne 782 HOT 1
- Key secret HOT 3
- json error
- Récupération des médias (images HOT 2
- clé partner et key secrete HOT 4
- Add JAV database
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api-allocine-helper.