Giter Site home page Giter Site logo

prakiraan-cuaca-api's Introduction

Prakiraan-Cuaca-API

cURL website BMKG and return JSON

Install:

<?php
// include cuaca.php
require("cuaca.php");

// call function cuaca
$cuaca = cuaca(); // return array print_r($cuaca);

// convert array to JSON
echo json_encode($cuaca);

?>

Return JSON:

cURL sukses
{
    "status": "online",
    "data": [
        {
            "kota": "Banda Aceh",
            "maps": {
                "latitude": 5.5482904,
                "longitude": 95.3237559
            },
            "prakiraan": {
                "sekarang": {
                    "tgl": "26 March 2016",
                    "cuaca": "Cerah Berawan",
                    "suhu": {
                        "min": "23",
                        "max": "34"
                    },
                    "kelembaban": {
                        "min": "58",
                        "max": "95"
                    }
                },
                "besok": {
                    "tgl": "27 March 2016",
                    "cuaca": "Cerah Berawan",
                    "suhu": {
                        "min": "23",
                        "max": "34"
                    },
                    "kelembaban": {
                        "min": "58",
                        "max": "95"
                    }
                }
            }
        },
        {
            "kota": "Medan",
            "maps": {
                "latitude": 3.5951956,
                "longitude": 98.6722227
            },
            "prakiraan": {
                "sekarang": {
                    "tgl": "26 March 2016",
                    "cuaca": "Hujan Ringan",
                    "suhu": {
                        "min": "23",
                        "max": "34"
                    },
                    "kelembaban": {
                        "min": "63",
                        "max": "92"
                    }
                },
                "besok": {
                    "tgl": "27 March 2016",
                    "cuaca": "Hujan Ringan",
                    "suhu": {
                        "min": "23",
                        "max": "34"
                    },
                    "kelembaban": {
                        "min": "63",
                        "max": "92"
                    }
                }
            }
        },
        ...
    ]
}
cURL error
{
  "status": "offline"
}

DEMO

prakiraan-cuaca-api's People

Contributors

bachors 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.