Last active
September 16, 2015 03:34
-
-
Save aspotton/640778079913af8c0acc to your computer and use it in GitHub Desktop.
Web Shrinker Website Category API: Public Preview - PHP Example
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 | |
if (!isset($argv[1])) { | |
print "You need to give the URL to lookup the category for: {$argv[0]} http://www.example.com\n"; | |
exit(1); | |
} | |
$uri = trim($argv[1]); | |
$request = "https://categories.webshrinker.com/preview/lookup/".strtr(base64_encode($uri), '+/', '-_'); | |
print "Requesting: $request\n\n"; | |
print_r(json_decode(file_get_contents($request))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details can be found here: Website URL Category API