Ella said:
> Please describe your:
> - at server-side I want to achieve...
> - at client-side when the user does...I want to...
Server-Side: a public organization whose pages I have downloaded, parsed,
and placed needed info into two databases at about 1 page every 1.5 seconds.
Client-Side: Me, on my Win Xp Pro (sp3) machine runnnig anxHarbour app with
the tIP modules.
Below I show the tIP-related getpage() function which 'gets' the needed
page. (The page retrieved is approx 64K thru 68K)
Of course, there is a bunch of work before the function is called and a
large amoun of 'parsing' code that I use to pick out needed pieces of info
which I place in my databases. I have now finished the downloading work
(over the last week) and have 18,580 records in one database, and approx
110,000 records in the second.
Now, my further problem:
The 'page' downloaded has a button that needs to be clicked
programmatically, so that it submits a request to the server for more info.
I believe this is an AJAX request because the page address doesn't change,
the viewable section doesn't change, except that another table of data opens
up on the screen where there is *more* information that I need and want to
get at.
So, I want to click that button (can it be done thru tIP ???) , and
start investigating what happens.
Thanks for your response.
-Mel
-------------------------------------------------------------------------
Here is the operating portion that 'gets' the needed page
***********************************************
FUNCTION GETPAGE(nKKKKCODE,cHTXFILE)
STATIC cUrlTpl :=
"
http://www.xxxxxxxxxxx.org/yyyyyy/yyyyy/Profile/yyyyyyProfile.aspx?ID=#fzzzid#"
LOCAL lOK := .T.
LOCAL oCon, oUrl
LOCAL cURL
LOCAL cLOG := "",lDOLOG := .F.
LOCAL cDATA,cDATAFILE := "\aaa\htx\C_#fzzzid#.htx"
LOCAL cKKKKCODE
cLOG := CRLF
cURL := cURLTPL // GET THE TEMPLATE
cKKKKCODE := NTOC(nKKKKCODE)
cUrl := STRTRAN(cUrl,"#fzzzid#",cKKKKCODE)
oUrl := tURL():New(cUrl)
oCon := TipClientHttp():New( oUrl )
oCon:nConnTimeout := 20000
IF oCon:Open(cUrl)
cDATA := oCon:ReadAll()
cHTXFILE := cDATAFILE
cHTXFILE := STRTRAN(cHTXFILE,"#fzzzid#",cKKKKCODE)
MEMOWRIT(cHTXFILE,cDATA)
ELSE
lDOLOG := .T. // MAKE THE LOG
cLOG += CRLF + "Can't connect with "+ oUrl:cServer
IF oCon:SocketCon == NIL
cLOG += CRLF + "Connection not initiated"
ELSEIF InetErrorCode( oCon:SocketCon ) == 0
cLOG += CRLF + "Server said: " + oCon:cReply
ELSE
cLOG += CRLF + "Error in connection: " + InetErrorDesc(
oCon:SocketCon )
ENDIF
ENDIF
oCon:Close()
IF .NOT. lDOLOG
RETURN lOK
ENDIF
cLOG += CRLF + "Done" + CRLF
MEMOWRIT("\aaa\LOGS\HTTPLOG.TXT",cLOG)
RETURN lOK
*************************************************