Created
May 9, 2015 07:51
-
-
Save lauri-kaariainen/73bf327fa6ca2677e38e to your computer and use it in GitHub Desktop.
Huuto.net category and item API usage with simple PHP code
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 | |
//CALLHUUTO AND ID! | |
if(isset($_GET['callHuuto']) && isset($_GET['id'])) { | |
$doc = new DOMDocument(); | |
//error_log('http://api.huuto.net/somt/0.9/items/'.$_GET['id']); | |
$doc->load('http://api.huuto.net/somt/0.9/items/'.$_GET['id']); | |
echo $doc->saveXML(); | |
die(); | |
} | |
//CALLHUUTO AND CATEGORY! NOTICE /CLOSINGITEMS | |
if(isset($_GET['callHuuto']) && isset($_GET['category'])) { | |
$doc = new DOMDocument(); | |
//error_log('http://api.huuto.net/somt/0.9/categories/'.$_GET['category']."/closing-items"); | |
$doc->load('http://api.huuto.net/somt/0.9/categories/'.$_GET['category']."/closing-items"); | |
echo $doc->saveXML(); | |
die(); | |
} | |
echo ""; | |
die(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment