{"id":25541157,"url":"https://github.com/sbrimon10/streamtape-php-client","last_synced_at":"2026-02-12T09:32:03.608Z","repository":{"id":276507058,"uuid":"929483972","full_name":"sbrimon10/streamtape-php-client","owner":"sbrimon10","description":"A simple PHP client for interacting with the Streamtape API. This client allows you to manage files, retrieve account information, and perform other operations easily via an object-oriented interface.","archived":false,"fork":false,"pushed_at":"2025-02-12T11:23:05.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T16:58:45.389Z","etag":null,"topics":["api","api-client","library","oop-php","php","streamtape"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbrimon10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-08T16:51:34.000Z","updated_at":"2025-02-12T11:23:08.000Z","dependencies_parsed_at":"2025-02-08T18:15:36.194Z","dependency_job_id":"2936326b-3cf1-4112-a13f-39ba6a708fc0","html_url":"https://github.com/sbrimon10/streamtape-php-client","commit_stats":null,"previous_names":["sbrimon10/streamtape-php-client"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sbrimon10/streamtape-php-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrimon10%2Fstreamtape-php-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrimon10%2Fstreamtape-php-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrimon10%2Fstreamtape-php-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrimon10%2Fstreamtape-php-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbrimon10","download_url":"https://codeload.github.com/sbrimon10/streamtape-php-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbrimon10%2Fstreamtape-php-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29362796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-client","library","oop-php","php","streamtape"],"created_at":"2025-02-20T06:29:31.823Z","updated_at":"2026-02-12T09:32:03.594Z","avatar_url":"https://github.com/sbrimon10.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Streamtape PHP Client\n\nA simple PHP client for interacting with the [Streamtape API](https://www.streamtape.com/). This client allows you to manage files, retrieve account information, and perform other operations easily via an object-oriented interface.\n\n## Features\n\n- [Retrieve Account Information](#get-account-information)\n- [Upload](#upload)\n- [Remote Upload](#remote-upload)\n- [Remove Remote Upload](#remove-remote-upload)\n- [Check Remote Upload Status](#check-remote-upload-status)\n- [File Info](#get-file-information)\n- [List Folder/Files](#list-files)\n- [Create Folder](#create-new-folder)\n- [Rename Folder](#rename-folder)\n- [Delete Folder](#delete-folder)\n- [Rename File](#rename-file)\n- [Move File](#move-file)\n- [Delete File](#delete-file)\n- [Lists Running Conversions](#running-converts)\n- [Lists Failed Conversions](#failed-converts)\n- [Get Thumbnail Image](#get-thumbnail-image)\n\n## Installation\n\nYou can install this library either by using Composer or by manually downloading the files.\n\n### 1. Using Composer (recommended)\n\nIf you are using Composer, you can add this repository to your `composer.json`:\n\n```bash\ncomposer require sbrimon/streamtape-php-client\n```\n\n### 2. Manual Installation\n\nIf you prefer to manually install, download the `Streamtape.php` file and include it in your project like this:\n\n```php\nrequire_once 'path/to/Streamtape.php';\n```\n\n## Usage\n\n### Initialization\n\nTo use the client, you need to initialize the `Streamtape` class with your Streamtape credentials: your login and API key.\n\n```php\n// Include the Streamtape class\nrequire_once 'path/to/Streamtape.php';\n\n// Initialize with your Streamtape login and API key\n//login= API-Login\n//key= API-Key / API-Password\n$streamtape = new Streamtape('your_login', 'your_api_key');\n```\n\n### Get Account Information\n\nYou can retrieve your account information (such as email) by calling the `AccountInfo()` method.\n\n```php\n// Get account information\n$AccountInfo = $streamtape-\u003eAccountInfo()-\u003etoArray();\necho \"Email: \" . $AccountInfo['email'] . \"\\n\";\n```\n\n### Upload\n\nTo upload a file, use the `Upload()` method. You can pass a file, and optionally specify the folder, file name, and SHA256 hash.\n\n```php\n// File to upload (using $_FILES array)\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n    $file = $_FILES['file']; // Ensure 'file' is from an HTML form\n   \n    $upload = $streamtape-\u003eUpload($file,'my video title.mp4','folderid'); //video name and folder id are optional.\n    ///json return\n    echo \"Upload Response: \" . $upload-\u003ejson();\n    //or\n    //Array Return\n    print_r($upload-\u003etoArray());\n}\n\n```\n### Remote Upload\n\nTo add a remote upload, use the `RemoteUpload()` method by providing a remote URL and optional parameters like folder, custom name, and headers.\n\n```php\n// Add a remote upload from a URL\n$streamtape-\u003eRemoteUpload('https://example.com/myfile.mp4');\necho \"Remote Upload Response: \" . $streamtape-\u003ejson();\n```\n\n### Remove Remote Upload\n\nTo remove a remote upload (or all), call the `RemoveRemoteUpload()` method and pass the remote upload ID or 'all' to delete all.\n\n```php\n// Remove a specific remote upload\n$streamtape-\u003eRemoveRemoteUpload('remote_upload_id');\necho \"Remote Upload Removal: \" . $streamtape-\u003ejson();\n```\n\n### Check Remote Upload Status\n\nTo check the status of a remote upload, use the `RemoteUploadStatus()` method by providing the remote upload ID.\n\n```php\n// Check remote upload status\n$streamtape-\u003eRemoteUploadStatus('remote_upload_id');\necho \"Remote Upload Status: \" . $streamtape-\u003ejson();\n```\n\n### Get File Information\n\nTo retrieve file information, use the `FileInfo()` method with the file ID.\n\n```php\n// Get file information\n$fileInfo = $streamtape-\u003eFileInfo('file_id');\necho \"File Info: \" . $fileInfo-\u003ejson();//json data return\necho \"File Info: \" . print_r($fileInfo-\u003etoArray());//array data return\n```\n\n### List Files\n\nYou can list files in a specific folder using the `ListFiles()` method.\n\n```php\n// List files in a folder\n$files = $streamtape-\u003eListFiles('folder_id');\necho \"Files: \" . $files-\u003ejson();\n```\n\n### Create New Folder\n\nTo create a new folder, use the `NewFolder()` method and specify the folder name (and optionally the parent folder ID).\n\n```php\n// Create a new folder\n$streamtape-\u003eNewFolder('new_folder_name');\necho \"Folder Creation Response: \" . $streamtape-\u003ejson();\n```\n\n### Rename Folder\n\nTo rename an existing folder, use the `RenameFolder()` method by providing the folder ID and the new folder name.\n\n```php\n// Rename a folder\n$streamtape-\u003eRenameFolder('folder_id', 'new_folder_name');\necho \"Folder Rename Response: \" . $streamtape-\u003ejson();\n```\n\n### Delete Folder\n\nTo delete a folder, use the `DeleteFolder()` method by providing the folder ID.\n\n```php\n// Delete a folder\n$streamtape-\u003eDeleteFolder('folder_id');\necho \"Folder Deletion Response: \" . $streamtape-\u003ejson();\n```\n\n### Rename File\n\nTo rename a file, use the `RenameFile()` method and provide the file ID and new file name.\n\n```php\n// Rename a file\n$streamtape-\u003eRenameFile('file_id', 'new_file_name');\necho \"File Rename Response: \" . $streamtape-\u003ejson();\n```\n\n### Move File\n\nYou can move a file to a different folder with the `MoveFile()` method, by providing the file ID and the target folder ID.\n\n```php\n// Move a file to a folder\n$streamtape-\u003eMoveFile('file_id', 'folder_id');\necho \"File Move Response: \" . $streamtape-\u003ejson();\n```\n\n### Delete File\n\nTo delete a file, use the `DeleteFile()` method with the file ID.\n\n```php\n// Delete a file\n$streamtape-\u003eDeleteFile('file_id');\necho \"File Deletion Response: \" . $streamtape-\u003ejson();\n```\n\n### Lists Running Conversions\n\nYou can retrieve a list of running conversions using the `RunningConverts()` method.\n\n```php\n// Get running conversions\n$streamtape-\u003eRunningConverts();\necho \"Running Conversions: \" . $streamtape-\u003ejson();\n```\n\n### Lists Failed Conversions\n\nTo list all failed conversions, use the `FailedConverts()` method.\n\n```php\n// Get failed conversions\n$streamtape-\u003eFailedConverts();\necho \"Failed Conversions: \" . $streamtape-\u003ejson();\n```\n\n### Get Thumbnail Image\n\nTo retrieve a thumbnail image for a specific file, use the `Thumbnail()` method and provide the file ID.\n\n```php\n// Get thumbnail image for a file\n$streamtape-\u003eThumbnail('file_id');\necho \"Thumbnail: \" . $streamtape-\u003ejson(); //$streamtape-\u003etoArray();\n```\n\n### Available Methods\n#### 0. `json()` or `toArray()`\n- those method return you json or array type data. you can use whichever you want to use \n- **Example** \n    - `$streamtape-\u003eListFiles()-\u003etoArray(); //this will return array data.`\n    \n    - `$streamtape-\u003eListFiles()-\u003ejson(); //this will return json data.`\n\n#### 1. `AccountInfo()`\n- **Parameters**: None\n\n---\n\n#### 2. `FileInfo($fileId)`\n- **Parameters**:\n  - `$fileId` (required): The file ID to retrieve information for.\n\n---\n\n#### 3. `ListFiles($folder = null)`\n- **Parameters**:\n  - `$folder` (optional): Folder ID to list files from. If not provided, lists files from the root.\n\n---\n\n#### 4. NewFolder($name, $pid = null)\n- **Parameters**:\n  - `$name` (required): The name of the new folder to be created.\n  - `$pid` (optional): Parent folder ID (if creating inside another folder).\n\n---\n\n#### 5. `RenameFolder($folder, $name)`\n- **Parameters**:\n  - `$folder` (required): The folder ID to rename.\n  - `$name` (required): The new name for the folder.\n\n---\n\n#### 6. `DeleteFolder($folder)`\n- **Parameters**:\n  - `$folder` (required): The folder ID to delete.\n\n---\n\n#### 7. `RenameFile($file, $name)`\n- **Parameters**:\n  - `$file` (required): The file ID to rename.\n  - `$name` (required): The new name for the file.\n\n---\n\n#### 8. `MoveFile($file, $folder)`\n- **Parameters**:\n  - `$file` (required): The file ID to move.\n  - `$folder` (required): The folder ID to move the file to.\n\n---\n\n#### 9. `DeleteFile($file)`\n- **Parameters**:\n  - `$file` (required): The file ID to delete.\n\n---\n\n#### 10. `RunningConverts()`\n- **Parameters**: None\n\n---\n\n#### 11. `FailedConverts()`\n- **Parameters**: None\n\n---\n\n#### 12. `Thumbnail($file)`\n- **Parameters**:\n  - `$file` (required): The file ID to get the thumbnail for.\n\n---\n\n#### 13. `RemoteUpload($url, $folder = null, $name = null, $headers = null)`\n- **Parameters**:\n  - `$url` (required): The remote URL to upload.\n  - `$folder` (optional): The folder ID to upload the file to.\n  - `$name` (optional): A custom name for the uploaded file.\n  - `$headers` (optional): Additional HTTP headers for the request.\n\n---\n\n#### 14. `RemoveRemoteUpload($id)`\n- **Parameters**:\n  - `$id` (required): The remote upload ID to remove. Pass 'all' to remove all remote uploads.\n\n---\n\n#### 15. `RemoteUploadStatus($id)`\n- **Parameters**:\n  - `$id` (required): The remote upload ID to check the status of.\n\n---\n\n#### 16. `Upload($videoFile, $fileName = null, $folder = null, $sha256 = null, $httponly = null)`\n- **Parameters**:\n  - `$videoFile` (required): The file to upload (passed in a `$_FILES` array).\n  - `$fileName` (optional): The desired file name on Streamtape.\n  - `$folder` (optional): The folder ID to upload the file to.\n  - `$sha256` (optional): The SHA256 hash of the file to upload.\n  - `$httponly` (optional): Whether or not to make the file available via HTTP only.\n\nFor additional API methods, refer to the [Streamtape API documentation](https://www.streamtape.com/docs).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n### Key Points:\n- The **installation** section explains how to install via Composer or manually.\n- The **usage** section covers initializing the client, getting account info, listing files, retrieving file info, and handling errors.\n- The **example usage** section shows a real-world example.\n- The **methods** section lists the available API methods you can use.\n\nThis README provides a complete and user-friendly guide for anyone who wants to use my PHP Streamtape client!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbrimon10%2Fstreamtape-php-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbrimon10%2Fstreamtape-php-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbrimon10%2Fstreamtape-php-client/lists"}