Created
October 9, 2021 14:41
-
-
Save Subtixx/b3c973da6f69a563e689988a12486257 to your computer and use it in GitHub Desktop.
This will let one use "Download Full Code" on Quickadminpanel with Trial (It works by grabbing the AJAX request when clicking on view code, copying the curl request and executing it in a cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Steps to get a project.json: | |
1. Register or Login to quickadminpanel | |
2. Create your project | |
3. Open developer tools (F12) | |
4. Navigate to the Networkanalysis | |
5. Click on "View Code" on quickadminpanel | |
6. There is now a request with the url "https://quickadminpanel.com/builder/XXXX/preview/files" | |
7. Right click the request -> copy as -> CURL | |
8. Use the curl in combination with piping (ex. >>) to redirect the output to project.json | |
ex. curl 'https://quickadminpanel.com/builder/XXXXX/preview/files' -X POST [..] >> project.json | |
9. Execute the code in this script | |
10. Profit. This will create the folder structure aswell as all files quickadminpanel generates! | |
*/ | |
$fileDir = "C:\\export\\"; | |
$arr = json_decode(file_get_contents("C:\\export\\project.json")); | |
foreach ($arr as $k => $v) { | |
parseEntity($fileDir, $k, $v); | |
} | |
function parseEntity($dir, $name, $entity){ | |
if($entity->isDir) | |
{ | |
$tempFileDir = $dir."\\".$name; | |
echo "Creating ".$tempFileDir."\n"; | |
mkdir($tempFileDir); | |
if($entity->content != null) { | |
foreach ($entity->content as $k => $v) { | |
parseEntity($tempFileDir, $k, $v); | |
} | |
} | |
}else{ | |
file_put_contents($dir."\\".$name, $entity->content); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment