<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>php</title>
    <link rel="alternate" type="text/html" href="http://101lab.net/php/" />
    <link rel="self" type="application/atom+xml" href="http://101lab.net/php/atom.xml" />
    <id>tag:101lab.net,2007-09-20:/php//31</id>
    <updated>2007-09-25T01:17:45Z</updated>
    <subtitle>phpやMySQLのメモとサンプル</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.21-ja</generator>

<entry>
    <title>リアルタイムでフォームのバリデーション</title>
    <link rel="alternate" type="text/html" href="http://101lab.net/php/2007/09/post.html" />
    <id>tag:101lab.net,2007:/php//31.2018</id>

    <published>2007-09-25T01:12:53Z</published>
    <updated>2007-09-25T01:17:45Z</updated>

    <summary>LiveValidationPHP ...</summary>
    <author>
        <name>101</name>
        <uri>http://101lab.net/blog/</uri>
    </author>
    
    
    <content type="html" xml:lang="ja" xml:base="http://101lab.net/php/">
        <![CDATA[<blockquote><div class="quotetitle"><a title="LiveValidationPHP | Home" href="http://livevalidationphp.leihitu.nl/index.php?page=home">LiveValidationPHP</a></div></blockquote>
]]>
        <![CDATA[<a href="/php/lib/livevalidation/example1.php">サンプル1</a>
<a href="/php/lib/livevalidation/example2.php">サンプル2</a>

<a href="/php/lib/livevalidation/example3.php">サンプル3</a>]]>
    </content>
</entry>

<entry>
    <title>QRコード生成</title>
    <link rel="alternate" type="text/html" href="http://101lab.net/php/2007/09/qr.html" />
    <id>tag:101lab.net,2007:/php//31.2016</id>

    <published>2007-09-24T23:34:23Z</published>
    <updated>2007-09-25T00:37:54Z</updated>

    <summary><![CDATA[ ＱＲコード CGI &amp; PHP scripts - QRcode ge...]]></summary>
    <author>
        <name>101</name>
        <uri>http://101lab.net/blog/</uri>
    </author>
    
    <category term="qrコード" label="QRコード" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://101lab.net/php/">
        <![CDATA[ <blockquote><div class="quotetitle"><a title="ＱＲコード CGI &amp; PHP scripts - QRcode generator for perl &amp; php" href="http://www.swetake.com/qr/qr_cgi.html">ＱＲコード CGI &amp; PHP scripts - QRcode generator for perl &amp; php</a></div></blockquote>]]>
        <![CDATA[<a href="http://101lab.net/php/lib/qr_img/php/qr_img.php?d=data[&e=(L,M,Q,H)][&s=int%20size][&v=(1-40)][&t=J][&m=(1-16)&n=(2-16)[&o=http://101lab.net/][&p=(0-255)]]">サンプル</a>

QRコードは(株)デンソーウェーブの登録商標です。]]>
    </content>
</entry>

<entry>
    <title>.htmlファイルでphpを利用</title>
    <link rel="alternate" type="text/html" href="http://101lab.net/php/2007/09/htmlphp.html" />
    <id>tag:101lab.net,2007:/php//31.1994</id>

    <published>2007-09-20T03:11:38Z</published>
    <updated>2007-09-20T03:13:33Z</updated>

    <summary> .htmlのままでphpを利用する方法。...</summary>
    <author>
        <name>101</name>
        <uri>http://101lab.net/blog/</uri>
    </author>
    
    <category term="apache" label="apache" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="html" label="html" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://101lab.net/php/">
         .htmlのままでphpを利用する方法。
        <![CDATA[<blockquote><a title="エックスサーバー　ホスティングサービス　−サポート−" href="http://www.xserver.ne.jp/support/support3d-30.html">エックスサーバー　ホスティングサービス　−サポート−</a>

◇PHP -> CGIとしての動作（ sv50サーバー以降 ）
                              
 sv50サーバー以降では、セキュリティの向上のため、PHP は Apache のモジュールとしてではなく、自動的にCGIとして動作します。
 通常、設定の変更は必要ありませんが、PHPが正常に動作しない場合は、PHPのパーミッションやPHPを設置しているディレクトリのパーミッションを[755] にしてください。</blockquote>

AddType application/x-httpd-php .html

mt-congigを

DBUmask 0072
HTMLUmask 0072
UploadUmask 0072
DirUmask 0072

HTMLPerms 0705
UploadPerms 0705

参考：<a title="MovableTypeインストール手順！3,20以降～Xserver（エックス・サーバー）編" href="http://55link.com/archives/2005/11/13-2054.html">MovableTypeインストール手順！3,20以降～Xserver（エックス・サーバー）編</a>]]>
    </content>
</entry>

<entry>
    <title>PHPで画像サムネイルを作成する便利クラス</title>
    <link rel="alternate" type="text/html" href="http://101lab.net/php/2007/08/php.html" />
    <id>tag:101lab.net,2007:/php//31.1995</id>

    <published>2007-08-31T03:14:38Z</published>
    <updated>2008-01-06T04:07:38Z</updated>

    <summary>PHPで画像サムネイルを作成する便利クラス『PHP Thumbnailer』:p...</summary>
    <author>
        <name>101</name>
        <uri>http://101lab.net/blog/</uri>
    </author>
    
        <category term="Code" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="image" label="image" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="reflection" label="reflection" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="thumbnail" label="thumbnail" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://101lab.net/php/">
        <![CDATA[<blockquote><div class="quotetitle"><a title="PHPで画像サムネイルを作成する便利クラス『PHP Thumbnailer』:phpspot開発日誌" href="http://phpspot.org/blog/archives/2006/08/phpphp_thumbnai.html">PHPで画像サムネイルを作成する便利クラス『PHP Thumbnailer』:phpspot開発日誌</a></div><br />PHPで画像サムネイルを作成する便利クラス『PHP Thumbnailer』<br /></blockquote>]]>
        <![CDATA[<p>オリジナル画像は下のオムライス。サイズは横500×縦375ピクセル。</p>
<p><img src="/images/Thumbnailer.jpg" /></p>

<p>html内で絶対パスで画像を指定します。縮小された表示ではなくて、ダイレクトにphpがサムネールを作成します。</p>
<textarea name="code" class="xml" cols="60" rows="10">
<img src="phpプログラムへのパス?filename=画像へのパス&width=横幅&height=縦幅" />
</textarea>

<p>
<img src="/common/scripts/php4_thumbnail/show_image.php?filename=/home/dtf/101lab.net/public_html/images/Thumbnailer.jpg&width=250&height=250" /></p>

<p>最近のアップルのデザインに多用されているリフレクション効果も可能です。</p>

<blockquote><p>createReflection($percent,$reflection,$white,$border,$borderColor)</p>

<ul>
	<li>$percent - What percentage of the image to create the reflection from</li>
	<li>$reflection - What percentage of the image height should the reflection height be</li>
	<li>$white - How transparent (using white as the background) the reflection should be, as a percent</li>
	<li>$border - Whether a border should be drawn around the original image (default is true)</li>
	<li>$borderColor - The hex value of the color you would like your border to be (default is #a4a4a4)</li>
</ul>
</blockquote>

<textarea name="code" class="php" cols="60" rows="10">
include_once('thumbnail.inc.php');

$thumb = new Thumbnail($_GET['filename']);
$thumb->resize(150,150);
$thumb->cropFromCenter(150);
$thumb->createReflection(40,40,80,true,'#a4a4a4');
$thumb->show();
$thumb->destruct();
exit;
</textarea>

<p>その都度ダイレクトに画像を生成するのでサーバーに負荷がかかります。ECサイトなどの画像を多用するサイト向きではないかもしれません。</p>]]>
    </content>
</entry>

</feed>
