ADutheil wrote:- Code: Select all Expand view RUN
Function TestUrl( cUrl )
local cRet := WebPageContents( cUrl )
local cFile := "test.txt"
LOCAL cBuff
LOCAL nHndl
LOCAL aShow
LOCAL nI
if Empty( cRet )
? "Invalid URL"
else
cRet := subStr( cRet, at( "BARI", cRet ) )
cRet := allTrim( subStr( cRet, 1, at( "Controlla", cRet ) - 1 ) )
nHndl := fCreate( cFile )
fWrite( nHndl, cRet )
fClose( nHndl )
IF ( nHndl := fOpen( cFile ) ) < 1
msgStop( "UNABLE TO OPEN: " + cFile )
ELSE
aShow := {}
WHILE hb_fReadLine( nHndl, @cBuff, chr( 10 ) ) == 0
cBuff := allTrim( cBuff )
IF ! empty( cBuff )
aAdd( aShow, {} )
aAdd( aTail( aShow ), subStr( cBuff, 1, 11 ) )
FOR nI := 12 TO 28 STEP 4
aAdd( aTail( aShow ), subStr( cBuff, nI, 2 ) )
NEXT
ENDIF
ENDDO
xBrowse( aShow )
ENDIF
endif
return nil
thanks very good
I need also the date and I made
local cData := WebPageContents( cUrl )
cData := subStr( cData, at( "ALMANACCO", cData )+9 )
cData := allTrim( subStr( cData, 1, at("BARI", cData ) -1 ) )
XBROWSER aShow title "Estrazione del "+ cdata
Run ok but I not Know if it 's Right!!!
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com