====== Web development ======
* Apache [[https://namu.wiki/w/아파치%20HTTP%20서버|Apache HTTP Server]], 나무위키 or [[wp>Apache_HTTP_Server|Apache HTTP Server]], Wikipedia
* PHP [[https://namu.wiki/w/PHP|PHP]], 나무위키
* mysql [[https://namu.wiki/w/MySQL|MySQL]], 나무위키
* WAMP -> http://www.wampserver.com/en/
* Installation
* D:/Wamp64
* 브라우저에서 localhost 로 접속 (http://localhost 혹은 http://127.0.0.1)
* vhost option 켜기
* ''# Include conf/extra/httpd-vhosts.conf''
* --> '' Include conf/extra/httpd-vhosts.conf''
* httpd-vhosts.conf 수정
This is a paragraph.
====== HTML ======
* [[http://www.w3schools.com/html|html, w3school]]
* put index.php file in nmp-project directory
This is a Heading
This is a paragraph.
This is another paragraph.
This is a linkThis is a paragraph.
";
echo "Requested URL: " . $url ."\n\n
\n\n";
$xml = simplexml_load_file($url);
// output raw starts
/*
print "";
print_r($xml->channel);
print "
";
echo "
";
*/
// output raw ends
foreach ($xml->channel->item as $movie) { // since exact query is not possible
$title=strip_tags($movie->title);
$subtitle=strip_tags($movie->subtitle);
$year = $movie->pubDate;
$dire = $movie->director;
$dire = "\"".str_replace("|", "\" \"", $dire)."\"";
$dire = str_replace("\"\"", "", $dire);
$actor = trim($movie->actor);
$actor = "\"".str_replace("|", "\" \"", $actor)."\"";
$actor = str_replace("\"\"", "", $actor);
$nRating = $movie->userRating;
$txt = $title."\t".$subtitle."\t".$year."\t".$dire."\t".$actor."\t".$nRating."\n";
$webtxt = "
*****
". $txt . "
*****
";
echo $webtxt;
fwrite($myfile, $txt);
$txt='';
// } else { }
}
}
fclose($myfile);
?>
Interstellar
Citizen Kane
The Sixth Sense
Predestination
결과값: http://my-site/naver.php