Skip to content

Instantly share code, notes, and snippets.

View iGlitch's full-sized avatar
🏠

Glitch iGlitch

🏠
View GitHub Profile
@iGlitch
iGlitch / updateindex.php
Created February 9, 2015 18:29
Index Updater
<?php
/*
* <?php include("update.php");?>を挿入すると過去3回の履歴を表示します
* テーブル用HTMLは自分で作成してください
* パーミッションを606か666にした、空のファイル(new.txt)を作成してください
* new.txtにログが残ります
* 書き込むときは update.php?put
* トップページにつかってるやつです。
* サイトの更新記録などにお使いください。
* タグは可です。改行は<br>に自動変換されます。
@iGlitch
iGlitch / rssupdate.php
Created February 9, 2015 18:31
UpdateRSS
<?php
/*
IndexUpdaterのRSSバージョンです。
サイトの更新記録などにお使いください。
RSS2.0対応のRSSファイルを更新と同時に作成します。
--enable-mbstringが入ってないとRSSファイルのUTF-8変換が出来ません
設置方法
空のファイル「new.txt」「index.xml」が無ければ作成します
@iGlitch
iGlitch / diary.php
Created February 9, 2015 18:35
Diary
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>にっきちょう</title>
</head>
<body>
<p align=center>
<font color="#332211" size=6><b>にっきちょう</b></font>
<BR><BR>
@iGlitch
iGlitch / looptest.php
Created February 9, 2015 18:37
Loop Speedtest
<?ループ対決
/*
while と for の速度を比較します。
サーバーの性能チェックに使えるかも・・
*/
<form action="<? echo $_SERVER['PHP_SELF'];?>">
<input type="text" name="a" size="5"> 回
<input type="submit" value=" Go "></form>
<?
function get(){
@iGlitch
iGlitch / calendar.php
Created February 9, 2015 18:40
Calendar
<?php
// カレンダー//
/* 使用法 <? include "cal.php"; ?> */
$PHP_SELF = "cal.php";
// ***.php?20030101 クエリー受信
$qry = $_SERVER['QUERY_STRING'];
// 指定日
if(ereg("^[0-9]{8}",$qry)){
$yr = substr($qry,0,4);
@iGlitch
iGlitch / ad.php
Last active August 29, 2015 14:15
Random Ad
<?php
srand((double)microtime()*1000000);
$ad_list1 = file("/ad.txt");
$ad_key1 = array_rand($ad_list1, 2);
$ad1 = $ad_list1[$ad_key1[0]];
// 表示
echo $ad1;
/*
ad.txt フォーマット
@iGlitch
iGlitch / mulituploader.php
Created February 9, 2015 18:45
Multi Uploader
<?php
/**************************
* MultiUPloader
* ==At Your Own Risk==
*************************/
/* Number of Upload files */
define("UPLOAD_NO", 10);
/* Access Password */
define("PASS", "1234");
@iGlitch
iGlitch / IP.php
Created February 9, 2015 18:46
IP <> Domain Lookup
<HTML><HEAD>
<META http-equiv="Content-Type" content="text/html;CHARSET=UTF-8">
<TITLE>IP-ドメイン変換</TITLE>
<style type="text/css">
<!--
body,input{ font-size: 12px;font-family:Verdana;}
.s{background-color:#e6e6ff;color:#000033;border: 1px #555555 solid; }
-->
</style>
</HEAD>
@iGlitch
iGlitch / checkmail.php
Last active August 29, 2015 14:15
Web Mailer Form
<?php
session_start();
if(phpversion()<"4.1.0"){
$_GET = $HTTP_GET_VARS;
$_POST = $HTTP_POST_VARS;
$_SESSION = $HTTP_SESSION_VARS;
}
?>
<html><head><title>メールチェッカー</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
@iGlitch
iGlitch / parseurl.php
Created February 9, 2015 18:52
Parse URL
<?php
/* parse_url*/
?>
<html><body bgcolor="#DEFFF3"><font size=-2>Parse Url<br>
<form action="parseurl.php" method="GET">
URL: <input type="text" size="60" name="url" value="http://glitchery.jp">
<input type="submit" value="‚ρ[‚·["><br></form></font><tt>
<?
if(isset($_GET['url'])):
$url = htmlspecialchars($_GET['url']);