Skip to content

Instantly share code, notes, and snippets.

@aspotton
Last active September 16, 2015 03:34
Show Gist options
  • Save aspotton/640778079913af8c0acc to your computer and use it in GitHub Desktop.
Save aspotton/640778079913af8c0acc to your computer and use it in GitHub Desktop.
Web Shrinker Website Category API: Public Preview - PHP Example
<?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)));
@aspotton
Copy link
Author

aspotton commented Sep 8, 2015

More details can be found here: Website URL Category API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment