{"id":18084859,"url":"https://github.com/coderofsalvation/browserstream","last_synced_at":"2025-04-12T20:10:38.105Z","repository":{"id":36417747,"uuid":"40722721","full_name":"coderofsalvation/BrowserStream","owner":"coderofsalvation","description":"Stream text to browser in realtime without using websockets using PHP","archived":false,"fork":false,"pushed_at":"2020-05-28T18:44:24.000Z","size":14,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T14:21:47.668Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2015-08-14T15:40:20.000Z","updated_at":"2024-05-09T09:10:38.000Z","dependencies_parsed_at":"2022-08-21T04:40:25.505Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/BrowserStream","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2FBrowserStream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2FBrowserStream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2FBrowserStream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2FBrowserStream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/BrowserStream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248625493,"owners_count":21135513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-31T15:08:26.851Z","updated_at":"2025-04-12T20:10:38.060Z","avatar_url":"https://github.com/coderofsalvation.png","language":"PHP","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"BrowserStream\n=============\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"\" width=\"250\" src=\"http://www.gifbin.com/bin/122014/1417561357_river_surfing.gif\"/\u003e\n  \u003c/p\u003e\nStream text to browser in realtime without using websockets.\nThink simple text progressbars, logging, longrunning tasks, terminal output etc.\n\n## Usage \n\n    $ composer require coderofsalvation/BrowserStream \n\nand then \n\n\t\t\u003c?php\n\t\t\t\n\t\t\tuse coderofsalvation\\BrowserStream;\n\n\t\t\tBrowserStream::enable();\n\t\t\tBrowserStream::put(\"loading\");\n\n\t\t\tfor( $i = 0; $i \u003c 10; $i++ ){\n\t\t\t\tBrowserStream::put(\".\");\n\t\t\t\tsleep(1);\n\t\t\t}\n\t\t?\u003e\n\nNow go to your browser and you'll see 'loading' and dots being added every second OH MY! :)\n\n\u003cimg src=\"https://raw.githubusercontent.com/coderofsalvation/BrowserStream/master/anim.gif?2\"/\u003e\n\nTest it with curl like so:\n\n    $ curl -H \"Accept: text/event-stream\" -N -s \"http://localhost/foo.php\"\n\n## Apache Gzip == no worky\n\nUsually apache gzips the output of php.\nThis is not good if you want realtime output.\nTherefore disable apache gzip buffering in .htaccess for a particular (realtime streaming) url like so: \n\n\t\tRewriteRule ^(yoururl)$ $1 [NS,E=no-gzip:1,E=dont-vary:1]\n   \n## License\n\nBSD\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fbrowserstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fbrowserstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fbrowserstream/lists"}