Actualiser api.php
This commit is contained in:
@@ -643,5 +643,15 @@ switch ($action) {
|
|||||||
echo json_encode($diag, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
echo json_encode($diag, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
|
||||||
exit;
|
exit;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'test_dvdfr':
|
||||||
|
$url = "https://www.dvdfr.com/api/search.php?title=" . urlencode($_GET['title'] ?? 'Matrix');
|
||||||
|
$html = httpGet($url, 5);
|
||||||
|
echo json_encode([
|
||||||
|
'url' => $url,
|
||||||
|
'http_length' => $html ? strlen($html) : 0,
|
||||||
|
'snippet' => $html ? substr($html, 0, 300) : 'VIDE/ERREUR'
|
||||||
|
]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
Reference in New Issue
Block a user