WebRequest txt파일로저장

VNote 2017.11.01 07:17:56 *: Imports System.Net

Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim requset As WebRequest = WebRequest.Create("http://locahost/post.php?w=" & TextBox1.Text)
requset.GetResponse()
End Sub
End Class

post.php 파일

 

<?php
$msg =$_GET['w'];
$logfile= 'data.txt';
$fp = fopen($logfile, "a");
fwrite($fp,$msg);
fclose($fp);
?>