ALVARO'S FREE AND EASY BROWSER LIBRARY   [EN] [ES]
What is it?

How can I use it?
In the project files there is an example program (main.cpp) ready to compile using "make" to test it.

First, you should create the browser object called AFEBLbrowser (and #include "afblbrowser.cpp" of course):
AFEBLbrowser *browser=new AFEBLbrowser();
GETTING A PAGE
Prototipe:
	string get(string host);
Example
	AFEBLbrowser *browser=new AFEBLbrowser();
string host="http://www.congdegnu.es/";
string response;
response=browser->get(host);
cout << response;
delete browser;
This code will show the html source code. You can use the string "response" to search text or something you want.

SENDING A FORM
Prototipes:
	void addInput(string inputName,string inputValue); //Add a new input
bool modifyInput(string inputName,string newValue);//Modify an input
bool removeInput(string inputName); //Remove an input
string getInputValue(string inputName); //Get the value of an input
void clearInputs(); //Delete all inputs
void showInputs(); //Show all inputs
Example
We are going to "emulate" this html form

HTML
	<form method="POST" action="http://webpage.com/page.php">
<input type="username" value="maxpowel">
<input type="password" value="123456">
</form>
C++
	AFEBLbrowser *browser=new AFEBLbrowser();
string response;
browser->addInput("username","maxpowel");
browser->addInput("password","123456");
browser->showInputs();
response=browser->submit("http://webpage.com/page.php");
This code will send the data to the server and show the form, and the answer will be stored in the string "response".

COOKIES
Cookies are automatically loaded when a page is retrieved.
Prototipes:
	void clearCookies(); //Delete cookies
Example
To delete the cookies (for end an page session for example)
	AFEBLbrowser *browser=new AFEBLbrowser();
string response;
browser->addInput("username","maxpowel");
browser->addInput("password","123456");
response=browser->submit("http://webpage.com/page.php");
//We are authenticated
browser->clearCookies();
//Cookies destroyed, now we are an anonymous visit