| 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();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 inputExample We are going to "emulate" this html form HTML <form method="POST" action="http://webpage.com/page.php">C++ AFEBLbrowser *browser=new AFEBLbrowser();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 cookiesExample To delete the cookies (for end an page session for example) AFEBLbrowser *browser=new AFEBLbrowser(); |