html code herunterladen
Posted: Thu 15. Mar 2012, 17:59
Hey,
ich habe mir ein Programm mit c++ geschrieben, dass einen html-code herunterläd und diesen dann durchsucht.
Wie kann ich das jetzt auf mein Handy kriegen?
Bada SDK kennt die ganzen header nicht!
Ich will also einfach einen html-code herunterladen und durchsuchen...
Wie mach ich das?
Der c++ code für Windows:
******************************************
******************************************
#include "stdafx.h"
#include <afx.h>
#include <afxwin.h>
#include <afxinet.h>
CString getHtmlSource(CString url)
{
CString somecode, s;
afxCurrentAppName = "CTestFtp";
CInternetSession session;
CInternetFile* file = NULL;
try
{
file = (CInternetFile*) session.OpenURL(url);
}
catch (CInternetException* m_pException)
{
file = NULL;
m_pException->Delete();
}
if(file)
{
while (file->ReadString(somecode) != NULL)
{
s = s + somecode;
}
}
if(file != NULL)
{
file->Close();
}
return s;
}
ich habe mir ein Programm mit c++ geschrieben, dass einen html-code herunterläd und diesen dann durchsucht.
Wie kann ich das jetzt auf mein Handy kriegen?
Bada SDK kennt die ganzen header nicht!
Ich will also einfach einen html-code herunterladen und durchsuchen...
Wie mach ich das?
Der c++ code für Windows:
******************************************
******************************************
#include "stdafx.h"
#include <afx.h>
#include <afxwin.h>
#include <afxinet.h>
CString getHtmlSource(CString url)
{
CString somecode, s;
afxCurrentAppName = "CTestFtp";
CInternetSession session;
CInternetFile* file = NULL;
try
{
file = (CInternetFile*) session.OpenURL(url);
}
catch (CInternetException* m_pException)
{
file = NULL;
m_pException->Delete();
}
if(file)
{
while (file->ReadString(somecode) != NULL)
{
s = s + somecode;
}
}
if(file != NULL)
{
file->Close();
}
return s;
}