PHP code example of joaosantanadev / skynet-php-mr
1. Go to this page and download the library: Download joaosantanadev/skynet-php-mr library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
joaosantanadev / skynet-php-mr example snippets
$drive = new \Skynet\MySky('roster donuts tycoon dunes muffin vector nasty jingle goblet amidst often wife digit earth eight');
$drive->setPortalLogin('[email protected] ', 'password');
$drive->setPortal('https://yourprivateportal.com');
$skyfile = $drive->getSkynet()->uploadFile(\Skynet\Types\File::fromResource('/mnt/data/file_to_upload.txt'));
echo $skyfile->getSkylink();
$skyfile = $drive->getSkynet()->uploadFile(\Skynet\Types\File::fromResource('Hello World'));
$skynet = new \Skynet\Skynet();
$drive->setPortalLogin('[email protected] ', 'password');
$skyfile = $drive->pinSkylink('XABvi7JtJbQSMAcDwnUnmp2FKDPjg8_tTTFP4BwMSxVdEg')
echo $skyfile->getSkylink();
$drive = new \Skynet\MySky('roster donuts tycoon dunes muffin vector nasty jingle goblet amidst often wife digit earth eight');
$drive->setPortalLogin('[email protected] ', 'password');
$drive->getDb()->setDataLink($drive->getKey()->getPrivatekey(), 'hello_world', 'XABvi7JtJbQSMAcDwnUnmp2FKDPjg8_tTTFP4BwMSxVdEg');
$entry = $drive->getDb()->getRegistry()->getEntry( $drive->getKey()->getPublicKey(), 'hello_world');
$drive = new \Skynet\MySky('roster donuts tycoon dunes muffin vector nasty jingle goblet amidst often wife digit earth eight');
$drive->setPortalLogin('[email protected] ', 'password');
$skylink = $drive->setJSON('/data/my_json_file.json', ['message' => 'hello world'] );
echo $skylink->getDataLink();