{"id":21814517,"url":"https://github.com/felladrin/online-visitors-counter","last_synced_at":"2025-04-13T23:47:00.280Z","repository":{"id":15466351,"uuid":"18199575","full_name":"felladrin/online-visitors-counter","owner":"felladrin","description":"Real-time online visitors counter using Ajax, PHP PDO and SQLite.","archived":false,"fork":false,"pushed_at":"2023-04-07T23:43:12.000Z","size":23,"stargazers_count":69,"open_issues_count":0,"forks_count":24,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-05T14:09:49.715Z","etag":null,"topics":["php","php-pdo","sqlite","visitor-counter"],"latest_commit_sha":null,"homepage":null,"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/felladrin.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},"funding":{"ko_fi":"felladrin"}},"created_at":"2014-03-28T03:10:31.000Z","updated_at":"2025-03-26T10:51:19.000Z","dependencies_parsed_at":"2024-11-27T19:16:51.067Z","dependency_job_id":null,"html_url":"https://github.com/felladrin/online-visitors-counter","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/felladrin%2Fonline-visitors-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felladrin%2Fonline-visitors-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felladrin%2Fonline-visitors-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/felladrin%2Fonline-visitors-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/felladrin","download_url":"https://codeload.github.com/felladrin/online-visitors-counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799699,"owners_count":21163398,"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":["php","php-pdo","sqlite","visitor-counter"],"created_at":"2024-11-27T14:38:59.194Z","updated_at":"2025-04-13T23:47:00.256Z","avatar_url":"https://github.com/felladrin.png","language":"PHP","funding_links":["https://ko-fi.com/felladrin"],"categories":[],"sub_categories":[],"readme":"# Online Visitors Counter\n\n[![License](https://badgen.net/badge/license/MIT/blue)](http://victor.mit-license.org/)\n\nReal-time online visitors counter using Ajax, PHP PDO and SQLite.\n\nIt adds a discrete link (auto-refreshed every 15 seconds) with the number of current users on the website.\n\n![](http://i.imgur.com/EJfXHgs.png)\n\nIf the link is clicked, a list of pages currently been visited appears, along with the number of visitors in each page.\n\n![](http://i.imgur.com/SoYLh8o.png)\n\n## Requirements\n\n- PHP5 (or later) with PDO SQLite extension\n- SQLite\n- Write permission on the folder 'ovc' so php can create and use the sqlite database\n\nIf you're not using a webhosting panel, like cPanel or VestaCP, please, install the above requirements manually on your OS.\n\n## Usage\n\nDownload and unzip [this package](https://github.com/felladrin/online-visitors-counter/archive/master.zip).\n\nThen upload the folder `ovc` to your website (anywhere).\n\nNow you just need to call it:\n\n```html\n\u003cscript src=\"path/to/ovc/counter.js\"\u003e\u003c/script\u003e\n```\n\n## Example\n\nThe `index.html` of this package is the best example you can find. You'll understand when you run it. (Remember it needs to be run on a PHP server).\n\nBut here is another quick example: Let's say your website is `http://example.com` and you've uploaded the `ovc` folder to the root directory, you would call the script like this:\n\n```html\n\u003cscript src=\"http://example.com/ovc/counter.js\"\u003e\u003c/script\u003e\n```\n\n## Customizing\n\nOn the config.php file, you'll find a lot of customizable parameters. Easy to set, as you can see on the following example.\n\nIf you want the link to show \"X Online\", you'd set:\n\n```php\n$visitorSingular = \"Online\";\n$visitorPlural = \"Online\";\n$linkFormat = '%1$d %2$s';\n```\n\nAnd the result would be:\n\n![](http://i.imgur.com/QaVxal7.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelladrin%2Fonline-visitors-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffelladrin%2Fonline-visitors-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffelladrin%2Fonline-visitors-counter/lists"}