Skip to content

Instantly share code, notes, and snippets.

Hiroshi Kuze hiroshikuze

Block or report user

Report or block hiroshikuze

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hiroshikuze
hiroshikuze / twitter_and_tws-feed.php
Last active Dec 14, 2019
1.Twitter→2.TWS-Feed 2→(XML)→3.XMLから必要な項目を抽出→4.リンクについて、URLのみ更に抽出→5.リンク先がtwitterになるよう加工→6.ホームページに出力
View twitter_and_tws-feed.php
<?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]);
@hiroshikuze
hiroshikuze / wireless_router_news.php
Created Dec 14, 2019
Google Newsを利用して無線ルーターニュースを取得する(2010-07-18現在)
View wireless_router_news.php
<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 / QRcode_and_bitly.php
Created Dec 14, 2019
bitlyによる短縮URL作成例(2010/04/11現在)
View QRcode_and_bitly.php
<?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 / php_rssreader.php
Created Dec 14, 2019
RSSreaderlib.php ( https://kuje.kousakusyo.info/tools/RSSreaderlib/ )を使用したはてなブックマークRSSとの連携例(2009/05/16現在)
View php_rssreader.php
<?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 Dec 14, 2019
MagpieRSSとRSSreaderlib ( https://kuje.kousakusyo.info/tools/RSSreaderlib/ )を用いてtwitter記事を取り込む(2010/04/11現在)
View twitter_rss.php
<?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 / last_posted_image_from_keitaihyakkei.php
Created Dec 14, 2019
携帯百景から最後に投稿された画像を呼び出すプログラム(2010/4/10現在)
View last_posted_image_from_keitaihyakkei.php
<?php
/**
* 携帯百景から最後に投稿された画像を呼び出すプログラム
*/
require_once "[[RSSreaderlibの組み込み先]]/RSSreaderlib/RSSreaderlib.php";
$HyakkeiReader = new RSSReader(CALL_MAKE_TEMPFILE_FOLDER, "[[RSSreaderlibが読み込んだRSSファイルのキャッシュ先]]");
$HyakkeiReader -> RSSReader(
'utf-8',
@hiroshikuze
hiroshikuze / image_resize.php
Created Dec 14, 2019
サムネイルを作成するプログラム(2010/4/12現在)
View image_resize.php
<?php
/**
* サムネイルを作成するプログラム
* image_resize.php
*/
include("[[phpThumbnailerの保存先]]");
$ir_temp = "[[サムネイル作業用保存先]]";
$changedomain = "[[サムネイルが表示できない時のスペーサー保存先]]/spacer.jpg";
View AmaQuickTemplete.html
<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-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></div></div><div class="AmaQuick-footer" style="clear:left"></div></div><br>
@hiroshikuze
hiroshikuze / Bootstrap_AmaQuick_Template_Amazon_Rakuten_YahooShopping.html
Last active Apr 29, 2020
AmaQuick ( https://creazy.net/amazon_quick_affiliate ) template with Bootstrap 4.x and Font Awesome compatible with Amazon, Rakuten, Yahoo! Shopping.
View Bootstrap_AmaQuick_Template_Amazon_Rakuten_YahooShopping.html
<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
You can’t perform that action at this time.