How can I store a Webview page in TinyDB to load it locally?

howto

#1

I want to store a webpage locally. How can I do that ?


#2

When you say locally, do you mean offline?


#3

yea… But not exactly I want to store a webView shown page in tinyDB for future use without any loading…


#4

That gets tricky You need to use an offline scraper and converter.

This one works and is cheap if you go above their limit.

https://grabz.it/api/


#5

You could also use php to copy a page and let php base64_encode it. After that the page echos the base64 content and you can base64 decode it inside the app. Than you dont need to use a api of others :wink:

<?php
ini_set('max_execution_time', 0);
if(isset($_GET["url"]))
{
$url = $_GET["url"]; //Sets the variable
if($url == "")
{
echo "URL_EMTY!";
exit;
}
$side = @file_get_contents($url); //copys the page contens
echo base64_encode($side); //encodes and outputs the contents
}
else
echo "You need to set the var url to a url ;) http://httpsphp.at/page_api.php?url=";
?>

exaple on server: http://httpsphp.at/page_api.php?url=https://inventor.life/my_account/


#6

Where should we put this code?


#7

Create a php server and put the code into a index.php…
you can visit the link that ive posted " http://httpsphp.at/page_api.php?url=" to test it out
I hope that’s the anser that you wanted … (sry if i misunderstood your question)


#8

Ok. Thank you. I will try


#9

if you need any help dont hasitate to contact me…