Returns the first embedded object of a node (specified by node ID). The node ID is returned by a previous WebPageStatXXX function call. Use this function in combination with WebPageStatGetNextEmbedded().
The return value is a node ID that can be used in other WebPageStatXXX calls.
To generally enable extended page statistics functionality, call WebSetOption with an option of WEB_OPT_DETAILED_PAGE_STAT (for a detailed description of the various values see WebSetOption).
WebAPI.bdh
WebPageStatGetFirstEmbedded( in nNode : number, in nFlags : number optional ): number;
0 if there is no embedded object
>0 otherwise
Parameter | Description |
---|---|
nNode | Node ID returned by a previous WebPageStatXXX function. |
nFlags |
Specifies the various options used by the search. If this parameter is omitted, the default options specified by the call to WebSetOption(WEB_OPT_DETAILED_PAGE_STAT) are used. Otherwise specify one of the following values:
|
dcltrans transaction TInit begin WebSetOption(WEB_OPT_DETAILED_PAGE_STAT, PAGE_STAT_FLAG_AllLoadedDocs); end TInit; transaction TWeb var nNodeRoot : number; nNode : number; fValue : float; sUrl : string; begin WebPageURL("http://lab3/"); nNodeRoot := WebPageStatGetRootNode(); if nNodeRoot > 0 then nNode := WebPageStatGetFirstEmbedded(nNodeRoot); while nNode > 0 do WebPageStatGetNodeInfo(null, sUrl); WebPageStatGetNodeData(STATFLAG_BytesSent, fValue); print("Url: " + sUrl); print("BytesSent: " + string(fValue)); nNode := WebPageStatGetNextEmbedded(nNodeRoot); end; end; end TWeb;