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 | |
define('ROOT',dirname(__FILE__)); | |
define('DS',DIRECTORY_SEPARATOR); | |
ini_set('display_errors','On'); | |
error_reporting(-1); | |
function debug($var) { | |
echo '<pre>'; |
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 | |
define('ROOT',dirname(__FILE__)); | |
define('DS',DIRECTORY_SEPARATOR); | |
//add my library folder into your include_path | |
set_include_path(get_include_path().PATH_SEPARATOR.ROOT.DS.'php-amazon-pa-wrapper'); | |
require_once 'Amazon.php'; | |
use AmazonProductAdvertising\Amazon as Amazon; |
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 | |
/* | |
* set operations | |
*/ | |
$amazon->request()->search('php'); | |
$amazon->request()->setParams(array( | |
'SearchIndex' => 'Books', | |
'ResponseGroup' => 'Large' | |
)); |
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 | |
/* | |
* set operations | |
*/ | |
$amazon->request()->detail('0596157134'); | |
$amazon->request()->setParams(array( | |
'ResponseGroup' => 'Large' | |
)); | |
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 | |
$is_valid = $amazon->response()->isRequestValid(); | |
if(!$is_valid) { | |
//get error type and messages | |
debug($amazon->response()->getErrors()); | |
} |
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
jQuery(document).ready(function() { | |
jQuery('#testSbWidget').jhistory(); | |
}); |
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
jQuery(document).ready(function() { | |
jQuery(window).on('popstate',function(event) { | |
event.preventDefault(); | |
var eventData = event.originalEvent.state; | |
if(eventData === null) { | |
jQuery('#content').html(''); | |
}else{ |
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
CakePlugin::load(array( | |
'Cloggy' => array( | |
'routes' => true, | |
'bootstrap' => 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
//setup registered modules | |
Configure::write('Cloggy.modules',array( | |
'CloggyBlog','CloggyUsers','ModuleTest' | |
)); |
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 | |
/* | |
* fix redirect because proxy server | |
*/ | |
if (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && !empty($_SERVER['HTTP_X_FORWARDED_HOST'])) { | |
$_SERVER['HTTP_X_FORWARDED_HOST'] = isset($_SERVER['HTTP_REFERER']) && !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; | |
} |
OlderNewer