This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This is part of a video tutorial | |
* at https://youtu.be/_HqS12AOwTk | |
* relevant instructions can be found | |
* in the description below the video. | |
*/ | |
$ip = $_SERVER['REMOTE_ADDR']; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This is part of a youtube video tutorial at https://youtu.be/gFg3BlQUJ0E | |
//include the rest client lib | |
//PHP REST Client https://github.com/KamranSyed/php-restclient | |
require_once 'restclient.php'; | |
$url = "http://api.openweathermap.org/data/2.5/"; | |
$api = new RestClient([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This is used in a video tutorial at https://youtu.be/Y777FeIDicU | |
require_once 'restclient.php'; | |
$url = "http://data.fixer.io/api/"; | |
$api = new RestClient([ | |
'base_url' => $url, | |
'format' => "json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//This gist is part of a video tutorial at https://youtu.be/TSWVm9VO-_U | |
require_once 'restclient.php'; | |
$url = "https://api.github.com/users/"; | |
$api = new RestClient([ | |
'base_url' => $url, | |
'format' => "json" | |
]); |