blog.Ring.idv.tw

Articles

Tamagotchi + Social Network = Moshi Monsters

Moshi Monsters.是一個針對孩童所設計的結合「電子雞」和「社交網路」為概念的網站,由英國「Mind Candy」公司所推出的~

使用者可以選擇自己喜愛的「Monster」,並且每天為它解決疑難雜症~ 它就能天天保持開心滴狀態(感情系統AI)~

而且你也可以為它裝飾房間、裝飾衣著、進行互動遊戲等等~ 若是你的朋友也有「Monster」~ 也可以去參觀它的房間、進行訊息服務等等…

有興趣的話來體驗看看唄!~ ^^ (我不是孩童~ XD)

相關資訊

Moshi Monsters: Neopets Meets Social Networking

2008-05-04 11:48:59 | Comments (1)

Adobe - Open Screen Project

Open Screen Project推廣順利的話~ 我想以後Flash Player就更無所不在了 :p

不然怎麼和Google Android來拚咧~ 所以採取無需授權費的推廣真是一項利多~

包含了幾項重要的改革:

Removing restrictions on use of the SWF and FLV/F4V specifications

.Publishing the device porting layer APIs for Adobe Flash Player

.Publishing the Adobe Flash® Cast™ protocol and the AMF protocol for robust data services

.Removing licensing fees – making next major releases of Adobe Flash Player and Adobe AIR for devices free

對我而言最重要的當然是第一條「Removing restrictions on use of the SWF and FLV/F4V specifications」~

目前的 SWF File Format Specification (Version 9)已經拿掉上圖的License Agreement ^^

這樣一來我們就可以直接寫軟體去"play"「SWF」檔案,而不是只能寫程式輸出「SWF」檔案嚕!~

相關資訊

Adobe Open Screen Project - Open Specifications and Open Technology to Help Expand Flash Player Reach

2008-05-03 08:57:34 | Comments (2)

「blog.Ring.idv.tw」一歲了~

本站自從「2007年4月30日」開站以來~ 在這整整一年的瀏覽人數達到了「166,866」~ 好吉利的數字呀! ^^ (雖然可能有為數不少的是Crawler所造成的XD)

底下是一些相關的紀錄:

.第一篇文章「Ring's Blog 正式啟用囉~

.「2007年11月2日」我的網站出現了Google PageRank分數「4」

.「部落格觀察」排行從「20701」進步到目前「4605

.本站到目前為止最火紅的一篇文章為「手動下載「天空部落」影音」XD~

希望能持續地分享經營下去~ ^^ 記得給我一些鼓勵呀~ 不然我可是會關站的~ 哈哈

好了~ 今天忙了一整天了~ 來去休息~ 明天又要出遠門~ XD

2008-04-30 00:05:34 | Comments (3)

申請APOL「.cn」中文網域只要88元~ 促銷中~

APOL「cn」網域促銷中,如果您想要自行學著架設DNS伺服器~ 或是您需要有一個個人的網域名稱~

那就不要錯過啦~ 現在只要申請「.cn」網域第一年都只要88元~ 很划算哦~

我這個「ring.idv.tw」每年都要400元咧~ 所以呢~ 有需要的人趕緊去申請吧~ ^^

P.S. 話說我已經申請了「swiler.com.cn」~ 嘿嘿~ (其實本來想申請「ilove.com.cn」滴~ = =")

補充說明

今早申請後~ 「www.Swiler.com.cn」現在是下午2:45分已經可以work了~ 蠻有效率的~ ^^v

2008-04-28 09:45:59 | Comments (3)

Web Scraping for Yahoo!生活+

在自然語言處理的領域中,有愈來愈多直接將網路資料當做語料庫(Corpus)來使用的趨勢~ 而要達成這樣的應用,當然需要有一個類似Web Crawler的機器人程式~ 來幫我們進行前置的搜集作業~ 而本文就是要做一個這樣的應用~ 這裡以「Yahoo!生活+」當做例子~

底下程式您可以自由地更改及使用~ 如果您有為它加上些許功能,也歡迎您貢獻您的成果 ^^

WebScraping.php

<?php
/**
 * Date: 2008/04/26
 * Shen(http://blog.ring.idv.tw)
 */
interface WebScraping
{
	public function doQuery();
	public function getBody();
}
?>

YahooLife.php

<?php
/**
 * Date: 2008/04/26
 * Shen(http://blog.ring.idv.tw)
 */
require_once "HttpClient.php";
require_once "WebScraping.php";

class YahooLife implements WebScraping
{
	private $param = "";
	private $body = "";
	
	function __construct(){}
	public function setKeyword($keyword)
	{
		$this->param = urlencode($keyword);
	}
	public function doQuery()
	{
		if($this->param != "")
		{
			$body = HttpClient::quickGet('http://twsearch.lifestyle.yahoo.com/search?cate=store&type=biz&p=' . $this->param);
			$body = str_replace("<em>",'',$body);
			$body = str_replace("</em>",'',$body);
			$this->body = $body;
			return true;
		}
		return false;
	}
	public function getBody()
	{
		return $this->body;
	}
	public function getStoreAddress()
	{
		$regex = '/<address>(.*)<\/address>/Us';
		preg_match_all($regex,$this->body,$match);
		return $match[1];
	}
	public function getSatisfaction()
	{
		$regex = '/<img src=\"http:\/\/tw.yimg.com\/i\/tw\/lifestyle\/icon_star0(.*).gif/Us';
		preg_match_all($regex,$this->body,$match);
		return $match[1];
	}
	public function getStoreID()
	{
		$regex = '/http:\/\/tw.wrs.yahoo.com\/\*\*http%3A%2F%2Ftw.lifestyle.yahoo.com%2Fbiz.html%3Fbizid%3D(.*)\">/Us';
		preg_match_all($regex,$this->body,$match);
		return $match[1];	
	}
}
?>

YahooStore.php

<?php
/**
 * Date: 2008/04/26
 * Shen(http://blog.ring.idv.tw)
 */
require_once "HttpClient.php";
require_once "WebScraping.php";

class YahooStore implements WebScraping
{
	private $storeId = "";
	private $body = "";
	
	function __construct(){}
	public function setStoreID($id)
	{
		$this->storeId = $id;
	}
	public function doQuery()
	{
		if($this->storeId != "")
		{
			$body = HttpClient::quickGet("http://tw.lifestyle.yahoo.com/biz_comment.html?bizid=" . $this->storeId . "&psm=");
			$this->body = $body;
			return true;
		}
		return false;
	}
	public function getBody()
	{
		return $this->body;
	}
	public function getStoreComments()
	{
		$regex = '/<blockquote>(.*)<\/blockquote>/Us';
		preg_match_all($regex,$this->body,$match);
		return $match[1];
	}
	public function getSatisfaction()
	{
		$regex = '/<img src=\"http:\/\/tw.yimg.com\/i\/tw\/lifestyle\/icon_star0(.*).gif/Us';
		preg_match_all($regex,$this->body,$match);
		return $match[1];
	}
}
?>

測試範例

<?
require_once "YahooLife.php";
require_once "YahooStore.php";

$Ylife = new YahooLife();
$Ylife->setKeyword("美食");
$Ylife->doQuery();
$address = $Ylife->getStoreAddress();
echo "<h2>商家地址</h2>";
show($address);

$satisfaction = $Ylife->getSatisfaction();
echo "<h2>商家滿意度</h2>";
show($satisfaction);

$storeid = $Ylife->getStoreID();
echo "<h2>商家ID</h2>";
show($storeid);

// sleep for 2 seconds
sleep(2);

$Ystore = new YahooStore();
$Ystore->setStoreID($storeid[1]);
$Ystore->doQuery();

$comments = $Ystore->getStoreComments();
echo "<h2>商家評價意見</h2>";
show($comments);

$satisfaction = $Ystore->getSatisfaction();
echo "<h2>商家評價滿意度</h2>";
show($satisfaction);

function show($value)
{
	foreach($value as $v)
		echo $v . "<br/>";	
}
?>

取得原始碼

2008-04-26 21:11:47 | Add Comment

Next Posts~:::~Previous Posts
Copyright (C) Ching-Shen Chen. All rights reserved.

::: 搜尋 :::

::: 分類 :::

::: 最新文章 :::

::: 最新回應 :::

::: 訂閱 :::

Atom feed
Atom Comment