'맘스다이어리'에 해당되는 글 1건

  1. 2008.09.11 맘스다이어리 매일 글쓰기
ITWorld2008. 9. 11. 16:21

맘스다이어리 매일 글쓰기


와이프가 메일 맘스다이어리들어가서 일기를 쓰는걸 보았다..

100일을 연이어 쓰면 오프라인 일기장을 만들어 준다는...

한번은 일기를 못 써서 속상해 하길래...

내가 할줄 아는 방법으로 고민해 봤다.. ^^



#!/usr/local/bin/php
require("/usr/local/apache/wwwhome/mutant/include/dbconn.inc");
set_time_limit(0);

$timestamp=time();
$date=date("Y-m-d",$timestamp);
$year=date("Y",$timestamp);
$month=date("m",$timestamp);
$day=date("d",$timestamp);


$target="http://www.ucool.in/community/sayingBBS/daily_saying_list.asp";
$cmd="lynx -source $target | grep 'textarea' | sed -e 's///g' -e 's/|/ /g'| sed -e 's/^M/ \\n/g' -e 's/ //
$text=system($cmd);

$t="";
$fd = fopen ("/usr/local/apache/wwwhome/mutant/moms/a.txt", "r");
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
$t=$t.$buffer;
}
fclose ($fd);
$t="\n 오늘의 명언".$t."\n\n From 민정이 서방탱, 지우아빠 ^^\n\n";

$t=urlencode($t);

$wget="/usr/bin/curl -c /usr/local/apache/wwwhome/mutant/moms/cookies http://www.momsdiary.co.kr/member/login.php?id=UserID\&password=Password";
system($wget);

$wget2="/usr/bin/curl -b /usr/local/apache/wwwhome/mutant/moms/cookies http://data1.momsdiary.co.kr/mydiary/diary/diary_act.php?mlog_id=UserID\&reg_date=$date\&vtype=0\&mode=write\&diary_year=$year\&diary_month=$month\&diary_day=$day\&weather=01\&emoticon=01\&letter=default\&diary_kind=0\&category=01\&title=$date\&comment=$t";
system($wget2);



%>

와이프가 무지 좋아한다는... ^^

벌써 200일이 지나서 2권 완성..ㅋㅋ

Posted by 영혼도둑