Skip to content

Instantly share code, notes, and snippets.

View hiroshikuze's full-sized avatar

Hiroshi Kuze hiroshikuze

View GitHub Profile
@hiroshikuze
hiroshikuze / AmaQuick_Template_Amazon_Rakuten_YahooShopping.html
Last active June 14, 2020 06:15
AmaQuick ( https://creazy.net/amazon_quick_affiliate ) template with Amazon, Rakuten, Yahoo! Shopping.
<div class="AmaQuick-box" style="margin-bottom:0"><div class="AmaQuick-image" style="float:left;margin:0 12px 1px 0"><a href="${url}" name="AmaQuick-link" rel="nofollow" target="_blank"><img src="${img}" alt="${title}" style="border:none"></a></div><div class="AmaQuick-info" style="line-height:120%;margin-bottom:10px"><div class="AmaQuick-name" style="margin-bottom:10px;line-height:120%"><a href="${url}" name="AmaQuick-link" rel="nofollow" target="_blank">${title}</a><div class="AmaQuick-powered-date" style="font-size:80%;margin-top:5px;line-height:120%">posted with <a href="${url}" title="${title} - AmaQuick" rel="nofollow" target="_blank">AmaQuick</a> at ${yyyy}.${mm}.${dd}</div></div><div class="AmaQuick-detail">${author}<br></div><div class="AmaQuick-rating_img">${avg_rating_img} ${avg_rating_text}<br></div><div class="AmaQuick-sub-info" style="float:left"><div class="AmaQuick-link-amazon" style="margin-top:10px"><a href="${url}" name="AmaQuick-llink" rel="nofollow" target="_blank">Amazon.co.jpで詳細を見る</a><
@hiroshikuze
hiroshikuze / Bootstrap_AmaQuick_Template_Amazon_Rakuten_YahooShopping.html
Last active April 29, 2020 14:12
AmaQuick ( https://creazy.net/amazon_quick_affiliate ) template with Bootstrap 4.x and Font Awesome compatible with Amazon, Rakuten, Yahoo! Shopping.
<div class="AmaQuick-box" style="margin-bottom:0"><div class="AmaQuick-image" style="float:left;margin:0 12px 1px 0"><a href="${url}" name="AmaQuick-link" rel="nofollow" target="_blank"><img src="${img}" alt="${title}" style="border:none"></a></div><div class="AmaQuick-info" style="line-height:120%;margin-bottom:10px"><div class="AmaQuick-name" style="margin-bottom:10px;line-height:120%"><a href="${url}" name="AmaQuick-link" rel="nofollow" target="_blank">${title}</a> <div class="AmaQuick-powered-date" style="font-size:80%;margin-top:5px;line-height:120%">posted with <a href="${url}" title="${title} - AmaQuick" rel="nofollow" target="_blank">AmaQuick</a> at ${yyyy}.${mm}.${dd}</div></div><div class="AmaQuick-detail">${author}<br></div><div class="AmaQuick-rating_img">${avg_rating_img} ${avg_rating_text}<br></div><div class="btn-group AmaQuick-sub-info" role="group" style="float:left"><div class="btn-group mr-2" role="group"><a href="${url}" name="AmaQuick-link-amazon" rel="nofollow" target="_blank"><button cl
@hiroshikuze
hiroshikuze / AmaQuickTemplete.html
Last active June 14, 2020 06:12
Template for AmaQuick ( https://creazy.net/amazon_quick_affiliate ), Amazon only.
<div class="AmaQuick-box" style="margin-bottom:0"><div class="AmaQuick-image" style="float:left;margin:0 12px 1px 0"><a href="${url}" name="AmaQuick-link" rel="nofollow" target="_blank"><img src="${img}" alt="${title}" style="border:none"></a></div><div class="AmaQuick-info" style="line-height:120%;margin-bottom:10px"><div class="AmaQuick-name" style="margin-bottom:10px;line-height:120%"><a href="${url}" name="AmaQuick-link" rel="nofollow" target="_blank">${title}</a><div class="AmaQuick-powered-date" style="font-size:80%;margin-top:5px;line-height:120%">posted with <a href="${url}" title="${title} - AmaQuick" rel="nofollow" target="_blank">AmaQuick</a> at ${yyyy}.${mm}.${dd}</div></div><div class="AmaQuick-detail">${author}<br></div><div class="AmaQuick-rating_img">${avg_rating_img} ${avg_rating_text}<br></div><div class="AmaQuick-sub-info" style="float:left"><div class="AmaQuick-link" style="margin-top:5px"><a href="${url}" name="AmaQuick-llink" rel="nofollow" target="_blank">Amazon.co.jpで詳細を見る</a></div></d
@hiroshikuze
hiroshikuze / image_resize.php
Created December 14, 2019 13:47
サムネイルを作成するプログラム(2010/4/12現在)
<?php
/**
* サムネイルを作成するプログラム
* image_resize.php
*/
include("[[phpThumbnailerの保存先]]");
$ir_temp = "[[サムネイル作業用保存先]]";
$changedomain = "[[サムネイルが表示できない時のスペーサー保存先]]/spacer.jpg";
@hiroshikuze
hiroshikuze / last_posted_image_from_keitaihyakkei.php
Created December 14, 2019 13:44
携帯百景から最後に投稿された画像を呼び出すプログラム(2010/4/10現在)
<?php
/**
* 携帯百景から最後に投稿された画像を呼び出すプログラム
*/
require_once "[[RSSreaderlibの組み込み先]]/RSSreaderlib/RSSreaderlib.php";
$HyakkeiReader = new RSSReader(CALL_MAKE_TEMPFILE_FOLDER, "[[RSSreaderlibが読み込んだRSSファイルのキャッシュ先]]");
$HyakkeiReader -> RSSReader(
'utf-8',
@hiroshikuze
hiroshikuze / php_rssreader.php
Created December 14, 2019 13:05
RSSreaderlib.php ( https://kuje.kousakusyo.info/tools/RSSreaderlib/ )を使用したはてなブックマークRSSとの連携例(2009/05/16現在)
<?php
require_once "<< RSSreaderlib.phpへのパス >>";
$RSSReader = new RSSReader(
'<< 出力する文字コード(sjis/euc/utf-8など) >>',
'<< MagpieRSS内のrss_fetch.incへのパス >>',
'<< ロードするRSSのURL(例: http://b.hatena.ne.jp/halohalolin/rss )>>'
);
?>
<div style="
@hiroshikuze
hiroshikuze / twitter_rss.php
Last active December 14, 2019 13:07
MagpieRSSとRSSreaderlib ( https://kuje.kousakusyo.info/tools/RSSreaderlib/ )を用いてtwitter記事を取り込む(2010/04/11現在)
<?php
RSSReader(CALL_MAKE_TEMPFILE_FOLDER, $temp);
$TwitterReader -> RSSReader(
'sjis',
'(MagpieRSSのrss_fetch.inc設置先)',
'http://twitter.com/statuses/user_timeline/19641481.rss'
);
$max = ($TwitterReader -> getContentsCount() > 5) ? 5: $TwitterReader -> getContentsCount();
for($i = 0; $i < $max; $i++) {
@hiroshikuze
hiroshikuze / QRcode_and_bitly.php
Created December 14, 2019 12:31
bitlyによる短縮URL作成例(2010/04/11現在)
<?php
$strURLfull = '[[短縮URLにしたいURLを指定してください]]';
$strBitlyResultArr = file("http://api.bit.ly/shorten?version=2.0.1&amp;longUrl=".urlencode($strURLfull)."&amp;login=[[ログインID]]&amp;apiKey=[[api key]]");
$strBitlyResult = "";
foreach($strBitlyResultArr as $strI) {
if(strpos($strI, "shortCNAMEUrl") > 0) {
$strBitlyResultArr = sscanf(trim($strI),'"shortCNAMEUrl": "%s",');
if(strlen($strBitlyResultArr) > 0) {
$strBitlyResult = str_replace('",','',$strBitlyResultArr[0]);
@hiroshikuze
hiroshikuze / wireless_router_news.php
Created December 14, 2019 12:13
Google Newsを利用して無線ルーターニュースを取得する(2010-07-18現在)
<li class="widget">
<h3>無線ルーターニュース</h3>
<?php
require_once "/var/www/vhosts/kuze.tsukaeru.jp/(RSSreaderlib.php の保存先を指定)";
$temp = "/var/www/vhosts/kuze.tsukaeru.jp/httpdocs/store/temp";
$RSSReader = new RSSReader(CALL_MAKE_TEMPFILE_FOLDER, $temp);
$RSSReader -> RSSReader(
'utf-8',
'/var/www/vhosts/kuze.tsukaeru.jp/httpdocs/(MagpieRSS/rss_fetch.inc の保存先を指定)',
@hiroshikuze
hiroshikuze / twitter_and_tws-feed.php
Last active December 14, 2019 11:53
1.Twitter→2.TWS-Feed 2→(XML)→3.XMLから必要な項目を抽出→4.リンクについて、URLのみ更に抽出→5.リンク先がtwitterになるよう加工→6.ホームページに出力
<?php
$TwitterReaderTemp = simplexml_load_file("http://bit.ly/1uZ74IM");
$TwitterReader = $TwitterReaderTemp -> channel;
$max = (count($TwitterReader) > 5) ? 5: count($TwitterReader);
$i = 0;
foreach($TwitterReader -> item as $Line) {
$title = str_replace("hiroshikuze: ","",$Line -> title);
preg_match("/http:\/\/www.orkut.gmodules.com\/hiroshikuze\/status\/[0-9]*/",$Line -> description,$links);
$link = str_replace("www.orkut.gmodules.com","www.twitter.com",$links[0]);