Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Retrieve website info

how would i go to get info? on a website like the result of website
EXAMPLE:
Put email here to check if valid:[email protected]
result:email already used

EXAMPLE 2:
Put email here to check if valid:[email protected]
result:no email registered with that email


like that above?

and get that text from above to show in a label



like if the result was
EMAIL ALREADY IN USE!

the label would show the same thing
any help please?❓
You mean you have a website and want to use that website from your program?
Or you want the code for the website?
If its the first one, use the WebClient object.
(Oct 4, 2016 09:05 AM)Ninja Wrote:  You mean you have a website and want to use that website from your program?
Or you want the code for the website?
If its the first one, use the WebClient object.

* WebClient class
(Oct 4, 2016 09:29 AM)+Haze Wrote:  * WebClient class

Fuck off cunt.
https://htmlagilitypack.codeplex.com/
(Oct 4, 2016 01:33 AM)pap.i Wrote:  how would i go to get info? on a website like the result of website
EXAMPLE:
Put email here to check if valid:[email protected]
result:email already used

EXAMPLE 2:
Put email here to check if valid:[email protected]
result:no email registered with that email


like that above?

and get that text from above to show in a label



like if the result was
EMAIL ALREADY IN USE!

the label would show the same thing
any help please?❓

I'm not 100% sure one your question but I will try to answer the best I can.
I am assuming you want to find out if a email address has been used to register on the website you are targeting.

First you are going to need to find where on the website you can find that info, maybe on the "forgot password" page as you usually have to enter your email address, this way after it is entered it will either say that the email doesn't exist on there system (so not valid) or will move to next page to Renew password (is valid). You could also do it on the register area because that would tell you if the email exists to, would be same sort of thing as mentioned with the "forgot password".

Next is how you would actually go about the program finding this, here are a couple of ways you could do it:
Webbrowser (easy for beginner)
Webclient
Httpwebrequest

Those are three options, now what you would have the code do is go to the page where you will test the email address, then it will have a textbox let's call it "email_id" , you would have the code read the source code of the website and input the email address into the "email_id" box. Then will click the button to submit the code.

Next it will lead to the result, once again your code will read through the source and look for either result, valid or not valid. Then you would have the code move that email address to a listbox depending on the result it gets... For example if valid move to listbox1 if not valid move to listbox2.

That is one way to look at it, sorry if it is confusing just typed this out quick on my phone for you.

Hope it helped.
Hey guys thanks for your replies and sorry for the confusion

but let's say i wanted to retrieve what the website text says and put into a label

like for instance

If webrowser1.text.contains("Incorrect Name")
how would i have the
Incorrect name put into a label?
You should start off with some real basic and beginner methods such as using the webbrowser control. Search in this forum for tutorials or codes and then you will start to understand it.
(Oct 4, 2016 07:26 PM)pap.i Wrote:  Hey guys thanks for your replies and sorry for the confusion

but let's say i wanted to retrieve what the website text says and put into a label

like for instance

If webrowser1.text.contains("Incorrect Name")
how would i have the
Incorrect name put into a label?
Code
string name = "name";
using (WebClient wc = new WebClient())
{
    string source = wc.DownloadString("url");
    if(source.contains(name))
    {
        label.Text = name;
    }
}

The using statement can be used on objects that inherit IDisposable (recognizable by the "Dispose()" method) to automatically dispose after you are done with them. These objects only exist inside the using statement. Disposing basically comes down to remove from memory. If you do not manually dispose of the used objects they can stay in memory for longer and thus use resources like RAM while you no longer need to use the object, and thus waste resources.
The DownloadString method on the WebClient takes a URL string as a parameter and returns the source of the webpage. the Text property on a label (label.Text in this example) is to get or set the text of the label.
(Oct 5, 2016 03:09 PM)Ninja Wrote:  
Code
string name = "name";
using (WebClient wc = new WebClient())
{
    string source = wc.DownloadString("url");
    if(source.contains(name))
    {
        label.Text = name;
    }
}

The using statement can be used on objects that inherit IDisposable (recognizable by the "Dispose()" method) to automatically dispose after you are done with them. These objects only exist inside the using statement. Disposing basically comes down to remove from memory. If you do not manually dispose of the used objects they can stay in memory for longer and thus use resources like RAM while you no longer need to use the object, and thus waste resources.
The DownloadString method on the WebClient takes a URL string as a parameter and returns the source of the webpage. the Text property on a label (label.Text in this example) is to get or set the text of the label.

The using statement can be used on objects that implements the IDisposable interface.
(Oct 4, 2016 07:26 PM)pap.i Wrote:  Hey guys thanks for your replies and sorry for the confusion

but let's say i wanted to retrieve what the website text says and put into a label

like for instance

If webrowser1.text.contains("Incorrect Name")
how would i have the
Incorrect name put into a label?

If Answer = False / Label1.Text = CurrentName.String?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by dbzdivikMar 18, 2016 08:09 PM 10 413 Mar 18, 2016 08:09 PM
Last Post: dbzdivik
[Python] by hunter122May 22, 2015 02:45 PM 2 186 May 22, 2015 02:45 PM
Last Post: hunter122
[.NET] by MаestroApr 6, 2015 08:54 PM 1 131 Apr 6, 2015 08:54 PM
Last Post: Tidas