Created
July 10, 2014 19:58
-
-
Save KaduNovoK/025ac74232b921ed136b to your computer and use it in GitHub Desktop.
Proxy and json reader files.
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 | |
$url = "http://localhost/labs/0100/02.php?url=http://ip.jsontest.com/"; | |
$jsonContent = file_get_contents($url); | |
$jsonObject = json_decode($jsonContent); | |
var_dump($jsonObject); | |
echo($jsonObject->ip); |
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 | |
$url = $_GET['url']; | |
$jsonContent = file_get_contents($url); | |
$jsonObject = json_decode($jsonContent); | |
echo(json_encode($jsonObject)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment