Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

Commit

Permalink
Fix a bug
Browse files Browse the repository at this point in the history
Signed-off-by: paizi <admin@blingwang.cn>
  • Loading branch information
paizi committed Jun 14, 2020
1 parent f9e1680 commit 5841a56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ function check($url){

if(!empty($_POST["select"]) && !empty($_POST["post"]) && $_POST["select"] == 'nyaapost'){
$nyaaurl=("https://i.nyaa.cat/data/$id/stats.json");
$nyaajson= file_get_contents($nyaaurl);
$nyaacurl = curl_init();
curl_setopt($nyaacurl, CURLOPT_URL, $nyaaurl);
curl_setopt($nyaacurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($nyaacurl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($nyaacurl, CURLOPT_SSL_VERIFYHOST, false);
$nyaajson = curl_exec($nyaacurl);
curl_close($nyaacurl);
$dkjson=json_decode($nyaajson,true);
if(strlen($nyaajson) == 0) {echo '
<div class="ui floating negative message">
Expand Down
8 changes: 7 additions & 1 deletion rev2.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,13 @@ function send_post($url, $post_data)

if(!empty($_POST["select"]) && !empty($_POST["post"]) && $_POST["select"] == 'nyaapost'){
$nyaaurl=("https://i.nyaa.cat/data/$id/stats.json");
$nyaajson= file_get_contents($nyaaurl);
$nyaacurl = curl_init();
curl_setopt($nyaacurl, CURLOPT_URL, $nyaaurl);
curl_setopt($nyaacurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($nyaacurl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($nyaacurl, CURLOPT_SSL_VERIFYHOST, false);
$nyaajson = curl_exec($nyaacurl);
curl_close($nyaacurl);
$dkjson=json_decode($nyaajson,true);
if(strlen($nyaajson) == 0) {echo '
<div class="ui floating negative message">
Expand Down

0 comments on commit 5841a56

Please sign in to comment.