Skip to content

KRI55H/RedditSaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reddit Saver

Packagist Version Latest Version Packagist Downloads PHP Version License

Installation

To install this package, follow these steps:

composer require kri55h/redditsaver

Usage

Here's an example demonstrating how to use the RedditSaver class from this package:

use kri55h\redditsaver\RedditSaver;

try {
    $reddit = new RedditSaver();
    $reddit->setPostURL('<reddit_post_url>');
    $videoSaved = $reddit->saveVIDEO();

    if ($videoSaved) {
        // Video saved successfully
        return 'Video saved!';
    } else {
        // Handle if video saving failed
        return 'Failed to save video.';
    }
} catch (Exception $e) {
    // Handle any exceptions or errors that occurred during the process
    return 'An error occurred: ' . $e->getMessage();
}

Replace <reddit_post_url> with the actual URL of the Reddit post you want to save as a video.