├── .github └── FUNDING.yml ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── embed.php └── mediafire.php /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://www.paypal.me/hklcf'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change. 4 | 5 | Please note we have a code of conduct, please follow it in all your interactions with the project. 6 | 7 | ## Pull Request Process 8 | 9 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a build. 10 | 2. Update the README.md with details of changes to the interface, this includes new environment variables, exposed ports, useful file locations and container parameters. 11 | 3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](https://semver.org/). 12 | 4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you do not have permission to do that, you may request the second reviewer to merge it for you. 13 | 14 | # Contributor Covenant Code of Conduct 15 | 16 | ## Our Pledge 17 | 18 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 19 | 20 | ## Our Standards 21 | 22 | Examples of behavior that contributes to creating a positive environment include: 23 | 24 | * Using welcoming and inclusive language 25 | * Being respectful of differing viewpoints and experiences 26 | * Gracefully accepting constructive criticism 27 | * Focusing on what is best for the community 28 | * Showing empathy towards other community members 29 | 30 | Examples of unacceptable behavior by participants include: 31 | 32 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 33 | * Trolling, insulting/derogatory comments, and personal or political attacks 34 | * Public or private harassment 35 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a professional setting 37 | 38 | ## Our Responsibilities 39 | 40 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 41 | 42 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 43 | 44 | ## Scope 45 | 46 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 47 | 48 | ## Enforcement 49 | 50 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [INSERT EMAIL ADDRESS]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 51 | 52 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 53 | 54 | ## Attribution 55 | 56 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 57 | 58 | [homepage]: https://www.contributor-covenant.org 59 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 HKLCF 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MediaFire-Stream-API 2 | [![GitHub issues](https://img.shields.io/github/issues/hklcf/MediaFire-Stream-API.svg)](https://github.com/hklcf/MediaFire-Stream-API/issues) 3 | [![GitHub forks](https://img.shields.io/github/forks/hklcf/MediaFire-Stream-API.svg)](https://github.com/hklcf/MediaFire-Stream-API/network) 4 | [![GitHub stars](https://img.shields.io/github/stars/hklcf/MediaFire-Stream-API.svg)](https://github.com/hklcf/MediaFire-Stream-API/stargazers) 5 | [![GitHub license](https://img.shields.io/github/license/hklcf/MediaFire-Stream-API.svg)](https://github.com/hklcf/MediaFire-Stream-API/blob/master/LICENSE) 6 | [![Twitter](https://img.shields.io/twitter/url/https/github.com/hklcf/MediaFire-Stream-API.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2Fhklcf%2FMediaFire-Stream-API) 7 | 8 | Grab MediaFire stream link 9 | 10 | ## Getting Started 11 | These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. 12 | ### Prerequisites 13 | - Web Hosting or VPS ([DigitalOcean](https://m.do.co/c/f5dea4b5cce3)) 14 | - PHP 5+ (suggest to use PHP 7.x) 15 | 16 | ## Deployment 17 | Put all files into the Public/htdocs directory. 18 | 19 | ## Usage 20 | ### Json API 21 | `http:///mediafire.php?url=` 22 | 23 | Live Demo: http://almeria5.rf.gd/mediafire/mediafire.php?url=https://www.mediafire.com/file/987f1u0gud1o94v/small.mp4/file 24 | 25 | ### Embed API 26 | `http:///embed.php?url=` 27 | 28 | Live Demo: http://almeria5.rf.gd/mediafire/embed.php?url=http://www.mediafire.com/file/987f1u0gud1o94v/small.mp4/file 29 | 30 | ## Contributing 31 | Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us. 32 | 33 | ## Versioning 34 | We use [SemVer](https://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/hklcf/MediaFire-Stream-API/tags). 35 | 36 | ## Authors 37 | * **HKLCF** - *Initial work* - [HKLCF](https://github.com/hklcf) 38 | 39 | See also the list of [contributors](https://github.com/hklcf/MediaFire-Stream-API/contributors) who participated in this project. 40 | 41 | ## License 42 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 43 | -------------------------------------------------------------------------------- /embed.php: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | MediaFire 10 | 11 | 12 |
13 | 14 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /mediafire.php: -------------------------------------------------------------------------------- 1 | ['bindto' => '0:0']])); // force IPv4 25 | 26 | preg_match('/aria-label="Download file"\n.+href="(.*)"/', $result, $matches); 27 | $result = urldecode($matches[1]); 28 | 29 | $output = []; 30 | $output[] = ['label' => 'Original', 'file' => $result, 'type' => 'video/mp4']; 31 | 32 | $output = json_encode($output); 33 | 34 | echo $output; 35 | ?> 36 | --------------------------------------------------------------------------------