Hacking Suggestion PHP script to host your own GDrive links + Welcome msg on TINFOIL / HBG

atomik22

Member
OP
Newcomer
Joined
Dec 18, 2014
Messages
16
Trophies
0
XP
70
Country
Canada
HBG SHOP / TINFOIL users

For those who might care, I made a very simple(shitty) php webpage to host your own GDrive links(Folders OR/AND single NSP) + Personnal welcome text.
Link to original source code on the page of the exemple below.

Just add the COMPLETE link shown in the webpage to the file browser of HBG/Tinfoil and you are done.

See it here --> http://www.atomikpc.com/static/

I can host it for free if you need it. PM me.
 
Last edited by atomik22,

ScarletDreamz

[Debug Mode]
Member
Joined
Feb 16, 2015
Messages
3,968
Trophies
1
Location
/dev/sda1
XP
4,294
Country
United States
The "Save" function redirects to a very weird shop.

And here is the source code for anyone who wants to try it:

Code:
<?

   if(isset($_POST['message'])){
       $message=$_POST['message'];
   }
       
   if(isset($_POST['links']))
   {
       $splitlinks=explode("\n", $_POST['links']);
       for($i=0;$i<sizeof($splitlinks)-1;$i++)
       {
           if($i!=sizeof($splitlinks)-2)
           {
               $linksTot=$linksTot . $splitlinks[$i] . "\",\"";
           }else{
              $linksTot=$linksTot . $splitlinks[$i] . "\"],\"success\":\"" . $message . "\"}";
           }
       }
       $final= "{\"files\":[],\"directories\":[\"" . $linksTot;
       $final=str_replace("\n", "", $final);
       $final=str_replace("\r", "", $final);
       $fp = fopen("index.json", "w");
       fwrite($fp, $final);
       fclose($fp);
       header("Location: " . "http://" . $_SERVER['HTTP_HOST'] . $location);
   }


   $fn = fopen("index.json","r");
   $result = fgets($fn);
   fclose($fn);
   $splittedR=explode('"', $result);
   for($i=5;$i<sizeof($splittedR);$i+=2)
   {
       if ($splittedR[$i]=="success")
       {
           $succes=1;
           $succesText=$splittedR[$i+2];
       }else{
           if($succes!=1){
              $links=$links . $splittedR[$i] . "\n";
           }
       }
   }
   
?>
<html>
   <head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
       <title>Tinfoil</title>
   </head>
   <body>
       <form name="allo" method="post">
           Welcome message<textarea id="message" name="message" rows="5" cols="70"><?echo $succesText?></textarea><br><br>
           Links (One GDrive link per line)<textarea id="links" name="links" rows="10" cols="200"><?echo $links?></textarea><br><br>
           <input type=Submit id="Envoyer" value="Save">
       </form>
   </body>
</html>
<?
   
   echo "Copy this link in the file browser of HBG Shop";
   function url(){
  return sprintf(
   "%s://%s%s",
   isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http',
   $_SERVER['SERVER_NAME'],
   $_SERVER['REQUEST_URI']
  );
}

echo "<br><br>" . url() . "index.json";
   
?>
 
General chit-chat
Help Users
  • Skelletonike @ Skelletonike:
    link doesn't work
    +2
  • Skelletonike @ Skelletonike:
    1H left, such a slow week.
  • Sonic Angel Knight @ Sonic Angel Knight:
    Okay, I had spaghetti :P
  • SylverReZ @ SylverReZ:
    Hope they made lots of spaget
  • K3N1 @ K3N1:
    Chill dog
  • SylverReZ @ SylverReZ:
    Chilli dog
  • Skelletonike @ Skelletonike:
    Damn, I'm loving the new zelda.
  • xtremegamer @ xtremegamer:
    loving the new zelda, i started a game, it was so fucking good, so i
    am waiting on my friend to get home so we can start a new one together
  • Skelletonike @ Skelletonike:
    I just dislike that they don't let me choose the voices before the game starts. Happened with botw as well, had to change to japanese and restart.
  • K3N1 @ K3N1:
    But the important question is can you choose gender
  • Skelletonike @ Skelletonike:
    Same way you can choose Gerald's gender.
  • Skelletonike @ Skelletonike:
    *Geralt, damn autocorrect.
  • Psionic Roshambo @ Psionic Roshambo:
    But can he be trans? Lol
  • K3N1 @ K3N1:
    Zelda transforms into link
  • Psionic Roshambo @ Psionic Roshambo:
    Link I'm not the princess your looking for.... *Pulls a crying game*
  • K3N1 @ K3N1:
    *skirt up* it's exactly what I always wanted
  • Skelletonike @ Skelletonike:
    Just scanned all my zelda amiibos, took a while but didn't get anything that cool, did get the lon lon ranch hylian fabrics though.
  • Skelletonike @ Skelletonike:
    It was pretty funny when I scanned wolf link and got a shit load of meat.
  • K3N1 @ K3N1:
    @Skelletonike, btw I ran that custom for mgs4 on the deck I'm amazed it got that far in game
  • K3N1 @ K3N1:
    Plug in*
  • K3N1 @ K3N1:
    Your favorite activity
    K3N1 @ K3N1: Your favorite activity