Skip to content

Commit

Permalink
urlencode
Browse files Browse the repository at this point in the history
  • Loading branch information
ibnux committed Dec 21, 2020
1 parent 1d7b632 commit 75d075b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@
if(substr($game['url'],0,4)=='http'){
if($game['fileSize']>0){
$json[] = [
'url'=>$game['url'].'#'.(str_replace('#','',$game['filename'])),
'url'=>$game['url'].'#'.urlencode(str_replace('#','',$game['filename'])),
'size'=>intval($game['fileSize'])
];
}else{
$json[] = $game['url'].'#'.(str_replace('#','',$game['filename']));
$json[] = $game['url'].'#'.urlencode(str_replace('#','',$game['filename']));
}
}else{
if($game['fileSize']>0){
$json[] = [
'url'=>'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.(str_replace('#','',$game['filename'])),
'url'=>'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.urlencode(str_replace('#','',$game['filename'])),
'size'=>intval($game['fileSize'])
];
}else{
$json[] = 'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.(str_replace('#','',$game['filename']));
$json[] = 'https://docs.google.com/uc?export=download&id='.$game['url'].'#'.urlencode(str_replace('#','',$game['filename']));
}
}
}
Expand Down

0 comments on commit 75d075b

Please sign in to comment.