Giter Club home page Giter Club logo

visit-counter's Introduction


visits

Visit Counter

Easy way to know how many visitors are viewing your Github, Website


Reference for Image

query Usage Default Example
page It can be your username or your website url https://visit-counter.vercel.app/counter.png?page=example.com
s Font size of counter 40 https://visit-counter.vercel.app/counter.png?page=example.com&s=60
c Color of counter #00ff00 https://visit-counter.vercel.app/counter.png?page=example.com&c=00ffff
bg Background Color of counter transparent https://visit-counter.vercel.app/counter.png?page=example.com&bg=000000
ff Font Family Digital https://visit-counter.vercel.app/counter.png?page=example.com&ff=electrolize
no No of digits in Counter 2 https://visit-counter.vercel.app/counter.png?page=example.com&no=6
tb Text to put before count "" https://visit-counter.vercel.app/counter.png?page=example.com&tb="Count: "
ta Text to put after count "" https://visit-counter.vercel.app/counter.png?page=example.com&ta=" visitors"

Getting the Raw Counts

If you don't want the PNG file but still want the count to use in something else, you can do a GET request to /counter

Using fetch in javascript

fetch("https://visit-counter.vercel.app/counter?page=example.com")
  .then(response => response.text())
  .then(count => console.log('counts: ',count));

Using Requests in Python

import requests

url = "https://visit-counter.vercel.app/counter?page=example.com"
response = requests.request("GET", url)

print("counts:", response.text)

Using cURL in PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://visit-counter.vercel.app/counter?page=example.com',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
));

$response = curl_exec($curl);
curl_close($curl);

echo "counts: $response";

Installation

  1. Get your firebase database URL at here
  2. Clone the repo
    git clone https://github.com/devXprite/visit-counter
  3. Install NPM packages
    cd visit-counter
    npm install
  4. Enter your Database URL in .env
    FIREBASE_DATABASE='YOUR DATABASE URL'
  5. Start Server
    npm start

Deploy

Click this button to configure your Project and deploy it to Vercel.

Deploy with Vercel

visit-counter's People

Contributors

devxprite avatar ghrlt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.