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
#place this in nginx.conf or a vhosts | |
if ($http_referer ~* (keyword|domain.com|www.domain.com)) | |
{ return 403; } |
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
#!/usr/bin/perl -w | |
#NetDNA API Sample Code - Perl | |
#Version 1.0a | |
use strict; | |
use JSON; | |
use Net::OAuth; | |
use LWP::UserAgent; | |
use URI; |
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 netdna_api_console.php http://staging.rws.netdna.com/company_alias/account.json true |
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 //vim: foldmethod=marker | |
//require_once("OAuth.php"); | |
class TestOAuthServer extends OAuthServer { | |
public function get_signature_methods() { | |
return $this->signature_methods; | |
} | |
} | |
class TestOAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod_RSA_SHA1 { |
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 | |
// vim: foldmethod=marker | |
/* Generic exception class | |
*/ | |
class OAuthException extends Exception { | |
// pass | |
} | |
class OAuthConsumer { |
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 | |
// Download - https://gist.github.com/raw/2210583/64b7007ab9d4d4cbb77efd107bb45e16fc6c8cdf/OAuth.php | |
require_once("OAuth.php"); | |
// Download - https://gist.github.com/raw/2210597/cdf6262b41e1de4562a020ad4cb371cbb9425f03/OAuthServer.php | |
require_once("OAuthServer.php"); | |
$test_server = new TestOAuthServer(new MockOAuthDataStore()); | |
$hmac_method = new OAuthSignatureMethod_HMAC_SHA1(); | |
$plaintext_method = new OAuthSignatureMethod_PLAINTEXT(); |
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 | |
/* | |
* NetDNA API Sample Code - PHP | |
* Version 1.0a | |
*/ | |
// Get it here: https://raw.github.com/gist/2791330/64b7007ab9d4d4cbb77efd107bb45e16fc6c8cdf/OAuth.php | |
require_once("OAuth.php"); |