Login Register


[TUT]Writing into an online file filter_list
Author
Message
[TUT]Writing into an online file #1
Hi Smile

Don't know how to call it in other words Biggrin sorry Smile
you can post suggestions Tongue

Ok, so today, I will teach you, how you can make a VB.NET app connect to the internet, and post some data there.

We will use:
=> a PHP file named index.php
=> a simple VB.NET code
=> a log.txt file. It doesn't have to contain anything

Setting up the web files:

First of all, make a new text document.

Write in the following code:
PHP Code:
<?php $action = $_GET['action']; $data = $_GET['data']; if ($action == "delete"){ unlink("log.txt"); $new = fopen("log.txt", 'a'); fclose($new); } if ($action == "write"){ $open = fopen("log.txt", 'a'); fwrite($open, $data."\n"); fclose($open); } ?>
Credits go to some unknown person Biggrin

Okay, save this as: index.php

Now make a new text document. Just name it: log.txt

upload these to a webhost. It can be free webhost Smile

Now, lets start the code.

So, first we have to make a webclient, so we will do:
Code:
Dim wc As New WebClient

You will get error, so add:
Code:
Imports System.Net
On the very top of your app

Now we will send the command to the php file.
As you can see, there are 2 commands: "write" and "delete", we will use "write" now.

So, the command will look like this:
Code:
http://yourhost.ext/index.php?action=write&data=
after the: "data=" you put in whatever you want Smile

Now, to make this work, we have to do this:
Code:
wc.DownloadString("http://yourhost.ext/index.php?action=write&data=Hello World!")

This will send a command to print "Hello World" into the log file Smile

Now to make it work, close the code with:
Code:
wc.Dispose()

if you don't want the text anymore, use:
Code:
wc.DownloadString("http://yourhost.ext/index.php?action=delete")

Thats all folks Smile
Have a great day!
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [TUT]Writing into an online file #2
Nice Tutorial. Smile
[Image: rytwG00.png]
Redcat Revolution!

Reply

RE: [TUT]Writing into an online file #3
(02-22-2011, 07:48 AM)Coder-san Wrote: Nice Tutorial. Smile

Thanks Smile
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [TUT]Writing into an online file #4
Great guide this can be the best way to transfer data without getting rev-engineered Smile
Pierce the life fibers with your drill.

Reply

RE: [TUT]Writing into an online file #5
Well... not really Smile

anybody can catch the packets and ofc edit them, also since its a text file, everybody can see it... better would be to encrypt the data + use SQL database Smile
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [TUT]Writing into an online file #6
great tutorial mate Smile

Reply

RE: [TUT]Writing into an online file #7
(02-24-2011, 11:17 PM)foudz32 Wrote: great tutorial mate Smile

Thanks Smile
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply

RE: [TUT]Writing into an online file #8
Nice tut my friend:thumbs:

Reply

RE: [TUT]Writing into an online file #9
(02-25-2011, 12:59 PM)ShadowV Wrote: Nice tut my friend:thumbs:

Thanks Smile Happy you liked it Smile
Staff will never ever ask you for your personal information.
We know everything about you anyway.

Reply







Users browsing this thread: