Rabu, 07 Oktober 2020

Upload file using VB.NET and PHP

VB COde

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Using wc As New System.Net.WebClient()

            wc.UploadFile("http://apps.pastioke.com/info.php", "x:\wa.php")

        End Using

    End Sub



PHP CODE

<?

if($_FILES){

$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");

$txt = print_r($_FILES, true);

$target_file = 'ff.txt';

move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);

fwrite($myfile, $txt);

$txt = print_r($_GET);

fwrite($myfile, $txt);

fclose($myfile);

?>


s

Minggu, 04 Oktober 2020

Foto Propades