Home
Home Products Downloads Knowledge Base Links And Awards Contact Us
abspdf.com::Knowledge Base
Knowledge Base
  absolutePDF
    FAQ
    Manuals
      absPDF-Creator Easy
      absPDF-Spool Base
      absPDF-Spool CMD
      absTools-HTTP
      absTools-SendMail
      absTools-SendMail CMD
    Samples
      absPDF-Creator Easy
      absTools-HTTP
      absTools-SendMail

Simple get (VB)

Shows how to make a simple GET request to a webpage and save the resulting HTML page locally.



1. simple get.zip [3 KB]
Top ]


File upload (VB)

This sample shows how to handle file uploads using the control.



2. file upload.zip [8 KB]
Top ]


Simple get (MSVC MFC)

Shows how to make a simple GET request to a webpage using MSVC++ 6.0 and MFC.

 

Note: to replicate it from scratch you need first to register the control as usual, with

regsvr32 abstools_http.dll

Then create a new MSVC++ project, go to View->Class Wizard. On the right, select Add Class...->From a type library. Browse to where you have a copy of abstools_http.dll and select it.

Accept all defaults.

Then you'll have a abstools-http.cpp and a abstools-http.h file that you'll need to include in your code
#include "abstools-http.h"

From this point on you create and use an instance of the object with something like the following code:


CString strRetVal;

CoInitialize(NULL);    //initialize COM library, do it once per thread

IabsTools_HTTP *p = new IabsTools_HTTP();
if (p->CreateDispatch("absTools-HTTP"))
{
    //strRetVal = p->Unlock("John Deo", "MyCompany", "123456789");
    //::MessageBox( 0, strRetVal, "Error", MB_OK );

    strRetVal = p->Init("200", "", "1", "c:\\cookies.txt", "", "", "", "");
    ::MessageBox( 0, strRetVal, "Error", MB_OK );
    strRetVal = p->GETAddTextField("q", "test");
    ::MessageBox( 0, strRetVal, "Error", MB_OK );

    strRetVal = p->SendRequest("http://www.google.com/search", "", "GET", "");
    ::MessageBox( 0, strRetVal, "Result", MB_OK );

    strRetVal = p->ResponseContent();
    ::MessageBox( 0, strRetVal, "Content", MB_OK )
}
else
{
    ::MessageBox( 0, "Errore creating instance", "Error", MB_OK );
}





3. simple get (MSVC MFC).zip [12 KB]
Top ]


Cookies (MSVC MFC)

This sample shows how cookies are managed by the control. Two special pages can be contacted, one sets a 30 days cookie, while the other sets just a session cookie. The 30 days cookie will be saved to c:\cookies.txt file.



4. cookies (MSVC MFC).zip [11 KB]
Top ]