RSSフィードでAmazonアダルト
脚フェチGalleryにAmazonで人気の絶対領域DVDを表示させた。毎日、最新版の絶対領域に関するDVDを取得し、RSS形式でハダカJapanサイト内で公開させ、脚フェチGallery側からはJavaScriptで取得し表示させるだけ。

プログラムソース
<div id="arss"><img src="https://a-hadaka.jp/images/loading.gif" alt="-"></div>
<style>#arss li{list-style:none;padding:10px}</style>
<script src="https://a-hadaka.jp/assets/js/jquery1.7.2.min.js"></script>
<script>
$(function() {
var setURL = 'https://a-hadaka.jp/amarss.rdf';
var setNUM = 5;
var setID = 'arss';
xmlLoad(setURL, setID, setNUM);
});
function xmlLoad(_xmlUrl, _id, _num) {
DD = new Date();
HH = DD.getHours();
MM = DD.getMinutes();
SS = DD.getSeconds();
var xmlUrl = _xmlUrl + "?" + HH + MM + SS;
var main = this;
$.ajax({
url: xmlUrl,
type: 'GET',
dataType: 'xml',
timeout: 1000000,
error: function() {
_msg = 'error';
xmlOpen(_msg, _id, _num);
},
success: function(_xml) {
main.xml = _xml;
_msg = 'load';
xmlOpen(_msg, _id, _num);
}
});
return;
}
var xmlOpen = function(_msg, _id, _num) {
var main = this;
var html = '<ul>';
var ID = _id;
var Num = _num;
var userAgent = window.navigator.userAgent.toLowerCase();
if (_msg == 'load') {
xml = main.xml;
var channelData = $(xml).find('channel')[0];
$(channelData).find('item').each(function(i) {
if (i < Num) {
postTitle = $(this).find('title').text();
postLink = $(this).find('link').text();
publishedDate = $(this).find('pubDate').text();
var pdate = new Date(publishedDate);
var pyear = pdate.getFullYear();
var pmonth = pdate.getMonth() + 1;
var pday = pdate.getDate();
if (pyear < 2000) pyear += 1900;
if (pmonth < 10) {
pmonth = "0" + pmonth;
}
if (pday < 10) {
pday = "0" + pday;
}
var postDate = pyear + "." + pmonth + "." + pday + " ";
var description = $(this).find('description')[0].firstChild.nodeValue;
var thumbnails = description.match(/<img[^>]+>/gi);
thumbnail = thumbnails[0];
html += '<li class="topimg thumbs-rollover">';
html += '<a href="' + postLink + '">' + thumbnail + '</a>';
html += '</li>';
}
});
} else {
html += '<li>通信エラー msg:' + _msg + '</li>';
}
html += '</ul>';
$("#" + ID).html(html);
}
</script>