<?xml version="1.0" encoding="UTF-8" ?><rdf:RDF 
  xmlns="http://purl.org/rss/1.0/"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xml:lang="ja">
  <channel rdf:about="http://w.atwiki.jp/terapad19/">
    <title>terapad19 @ ウィキ</title>
    <link>http://w.atwiki.jp/terapad19/</link>
    <atom:link href="https://w.atwiki.jp/terapad19/rss10.xml" rel="self" type="application/rss+xml" />
    <atom:link rel="hub" href="https://pubsubhubbub.appspot.com" />
    <description>terapad19 @ ウィキ</description>

    <dc:language>ja</dc:language>
    <dc:date>2008-02-08T11:07:26+09:00</dc:date>
    <utime>1202436446</utime>

    <items>
      <rdf:Seq>
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/14.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/13.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/12.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/11.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/10.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/9.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/8.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/7.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/6.html" />
                <rdf:li rdf:resource="https://w.atwiki.jp/terapad19/pages/5.html" />
              </rdf:Seq>
    </items>
	
		
    
  </channel>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/14.html">
    <title>PHP課題/3</title>
    <link>https://w.atwiki.jp/terapad19/pages/14.html</link>
    <description>
      **課題3
JavaScript を PHP で作成し、HTML に埋め込み可能なGoogleサイト検索を作成
( php に引数を渡して、サイトを選択できるようにする )


***PHP
#highlight(php){{
&lt;?php
header(&#039;Content-Type: text/javascript; Charset=euc-jp&#039;);
header(&#039;Expires: Mon, 26 Jul 1997 05:00:00 GMT&#039;);

function dw($str){
    print &#039;document.write(&quot;&#039; . $str . &#039;&quot;);&#039;;
}

$target = $_GET[&#039;target&#039;];

if($target == &quot;&quot;)
{
    print &quot;targetがからです。&quot;;
    exit();
}

dw(&quot;&lt;form method=get action=&#039;http://www.google.co.jp/search&#039;&gt;&quot;);
dw(&quot;&lt;a href=&#039;http://www.google.co.jp/&#039;&gt;&quot;);
dw(&quot;&lt;img src=&#039;http://www.google.com/logos/Logo_40wht.gif&#039; &quot;);
dw(&quot;border=&#039;0&#039; alt=&#039;Google&#039; align=&#039;absmiddle&#039;&gt;&lt;/a&gt;&quot;);
dw(&quot;&lt;input type=hidden name=domains value=&#039;&quot;.$target.&quot;&#039;&gt;&lt;br&gt;&quot;);
dw(&quot;&lt;input type=radio name=sitesearch value=&#039;&quot;.$target.&quot;&#039; checked&gt; &quot;.$target.&quot; を検索&quot;);
dw(&quot;&lt;input type=text name=q size=31 maxlength=255 value=&#039;&#039;&gt;&quot;);
dw(&quot;&lt;input type=hidden name=ie value=Shift_JIS&gt;&quot;);
dw(&quot;&lt;input type=hidden name=oe value=Shift_JIS&gt;&quot;);
dw(&quot;&lt;input type=hidden name=hl value=&#039;ja&#039;&gt;&quot;);    </description>
    <dc:date>2008-02-08T11:07:26+09:00</dc:date>
    <utime>1202436446</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/13.html">
    <title>PHP課題/2</title>
    <link>https://w.atwiki.jp/terapad19/pages/13.html</link>
    <description>
      **課題2】
GD を PHP で作成し、HTML に&lt;IMG ～&gt; で埋め込み可能なアクセスカウンタを作成
( アクセスのカウントは、DB を使用する )

***PHPソース(access_counter_image.php)
#highlight(php){{
&lt;?
# **********************************************************
# このソースコードは、utf-8s で記述されています
# ( ソースそのものの形式は utf-8n です )
# **********************************************************
header(&quot;Content-type: image/png&quot;);
header( &quot;Expires: Wed, 31 May 2000 14:59:58 GMT&quot; );

# **********************************************************
# 内部コードは、EUC-JP
# **********************************************************
mb_language( &quot;ja&quot; );
mb_internal_encoding( &quot;UTF-8&quot; );

require(&quot;MDB2.php&quot;);

function printImage($img_text)
{
    $font_path = &quot;yutapon_coding_075.ttc&quot;;
    # **********************************************************
    # キャンバス作成
    # **********************************************************
    $im = imagecreate( 150, 30 );
    
    # ***********************************************************
    # 画像の背景色
    # image    </description>
    <dc:date>2008-02-08T11:08:42+09:00</dc:date>
    <utime>1202436522</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/12.html">
    <title>PHP課題/1</title>
    <link>https://w.atwiki.jp/terapad19/pages/12.html</link>
    <description>
      **【課題1
JavaScript を PHP で作成し、HTML に埋め込み可能なアクセスカウンタを作成
( アクセスのカウントは、DB を使用する )

***テーブル作成
#highlight(sql){{
CREATE TABLE (
 access_counter mediumint
);
}}

***PHPソース(access_counter.php)
#highlight(php){{
&lt;?php
header(&quot;Content-Type: text/javascript; Charset=shift_jis&quot;);
header(&quot;Expires: Mon, 26 Jul 1997 05:00:00 GMT&quot;);
?&gt;
&lt;?php

require(&quot;MDB2.php&quot;);

function dw($str){
    print &quot;document.write(\&quot;&quot; . $str . &quot;\&quot;);&quot;;
}

$target = &quot;http://localhost/access_counter/&quot;;

// アクセス制御
if(substr($_SERVER[&#039;HTTP_REFERER&#039;],0,strlen($target))!=$target)
{
    dw(&quot;アクセスできません。&quot;);
    exit();    
}

// 
$db = MDB2::factory(&quot;mysql://username:password@host/dbname&quot;);

// カウンターの取得
$result = $db-&gt;queryOne(&quot;SELECT * FROM access_counter&quot;);

$count = $result[&quot;count&quot;];

$new_count = $count + 1;
dw($new_count);

// カウンターの更新
$sth = $db-&gt;prepare(&#039;UPDATE access_counter SET count = ?&#039;, array(&#039;integer&#039;), MDB2_PREPARE_MANIP);
$sth-&gt;execute($new_count);


?&gt;

}}

***埋め込み    </description>
    <dc:date>2008-02-08T10:44:42+09:00</dc:date>
    <utime>1202435082</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/11.html">
    <title>PHP課題</title>
    <link>https://w.atwiki.jp/terapad19/pages/11.html</link>
    <description>
      #ls2    </description>
    <dc:date>2008-02-08T10:44:29+09:00</dc:date>
    <utime>1202435069</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/10.html">
    <title>プラグイン/コメント</title>
    <link>https://w.atwiki.jp/terapad19/pages/10.html</link>
    <description>
      * コメントプラグイン
@wikiのwikiモードでは
 #comment()
と入力することでコメントフォームを簡単に作成することができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_60_ja.html


-----
たとえば、#comment() と入力すると以下のように表示されます。

#comment    </description>
    <dc:date>2008-02-08T10:08:32+09:00</dc:date>
    <utime>1202432912</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/9.html">
    <title>プラグイン/関連ブログ</title>
    <link>https://w.atwiki.jp/terapad19/pages/9.html</link>
    <description>
      * 関連ブログ
@wikiのwikiモードでは
 #bf(興味のある単語)
と入力することで、あるキーワードに関連するブログ一覧を表示することができます

詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_161_ja.html

-----


たとえば、#bf(ゲーム)と入力すると以下のように表示されます。


#bf(ゲーム)
    </description>
    <dc:date>2008-02-08T10:08:32+09:00</dc:date>
    <utime>1202432912</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/8.html">
    <title>プラグイン</title>
    <link>https://w.atwiki.jp/terapad19/pages/8.html</link>
    <description>
      @wikiにはいくつかの便利なプラグインがあります。

-----


#ls

-----

これ以外のプラグインについては@wikiガイドをご覧ください
=&gt;http://atwiki.jp/guide/
    </description>
    <dc:date>2008-02-08T10:08:32+09:00</dc:date>
    <utime>1202432912</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/7.html">
    <title>プラグイン/動画(Youtube)</title>
    <link>https://w.atwiki.jp/terapad19/pages/7.html</link>
    <description>
      * 動画(youtube)
@wikiのwikiモードでは
 #video(動画のURL)
と入力することで、動画を貼り付けることが出来ます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_209_ja.html

また動画のURLはYoutubeのURLをご利用ください。
＝＞http://www.youtube.com/

-----


たとえば、#video(http://youtube.com/watch?v=kTV1CcS53JQ)と入力すると以下のように表示されます。


#video(http://youtube.com/watch?v=kTV1CcS53JQ)

    </description>
    <dc:date>2008-02-08T10:08:32+09:00</dc:date>
    <utime>1202432912</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/6.html">
    <title>プラグイン/アーカイブ</title>
    <link>https://w.atwiki.jp/terapad19/pages/6.html</link>
    <description>
      * アーカイブ
@wikiのwikiモードでは
 #archive_log()
と入力することで、特定のウェブページを保存しておくことができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/25_171_ja.html


-----


たとえば、#archive_log()と入力すると以下のように表示されます。
保存したいURLとサイト名を入力して&quot;アーカイブログ&quot;をクリックしてみよう


#archive_log()
    </description>
    <dc:date>2008-02-08T10:08:32+09:00</dc:date>
    <utime>1202432912</utime>
  </item>
    <item rdf:about="https://w.atwiki.jp/terapad19/pages/5.html">
    <title>プラグイン/編集履歴</title>
    <link>https://w.atwiki.jp/terapad19/pages/5.html</link>
    <description>
      * 更新履歴
@wikiのwikiモードでは
 #recent(数字)
と入力することで、wikiのページ更新履歴を表示することができます。
詳しくはこちらをご覧ください。
＝＞http://atwiki.jp/guide/17_117_ja.html


-----


たとえば、#recent(20)と入力すると以下のように表示されます。


#recent(20)
    </description>
    <dc:date>2008-02-08T10:08:32+09:00</dc:date>
    <utime>1202432912</utime>
  </item>
  </rdf:RDF>
