Added language page
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
This commit is contained in:
parent
921c23aa80
commit
25c2b3b98c
12
src/languages.php
Normal file
12
src/languages.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://api.moviequotebot.louis-vallat.xyz/v1/languages/list');
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
$obj = json_decode($result, true);
|
||||
foreach ($obj as $l) {
|
||||
echo $l["alpha2_b"] . " - " . $l["english"] . "<br>";
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
<?php
|
||||
$ch = curl_init();
|
||||
// IMPORTANT: the below line is a security risk, read https://paragonie.com/blog/2017/10/certainty-automated-cacert-pem-management-for-php-software
|
||||
// in most cases, you should set it to true
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_URL, 'https://api.moviequotebot.louis-vallat.xyz/v1/subtitles/list');
|
||||
$result = curl_exec($ch);
|
||||
|
Loading…
Reference in New Issue
Block a user