Webデータ取得(HTMLソース取得, file_get_contents)
<html> <head> <title>Webデータ取得</title> </head> <body> <form action="" method="POST" style="width:100%;text-align:center"> Webデータ取得<br> <textarea cols="80" rows="20"> <?php $url = "https://webings.net/sample/"; //Webデータ取得先アドレス $html = file_get_contents($url); //Webデータ取得 echo $html; //Webデータ表示 ?> </textarea> </form> </body> </html>
〔 実行する 〕