FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour www/web connect funcion or class?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
www/web connect funcion or class?
Posted: Thu Apr 26, 2007 12:28 PM

Hi,
I want a function/class("www.myside.com/down/a1.exe","d:\myapp\tmp",loverwrite)
so easily support my app upgrade/download newfile from web site.

Thanks!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 840
Joined: Thu Oct 13, 2005 07:05 PM
www/web connect funcion or class?
Posted: Thu Apr 26, 2007 02:59 PM

TURL class has what you're looking for.... available in xHarbour

Saludos

R.F.
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
www/web connect funcion or class?
Posted: Fri Apr 27, 2007 02:54 AM

oUrl := tURL():New(“http://www.my.com/down/a1.dll")
get a crash.

Regards!

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 129
Joined: Mon Oct 17, 2005 03:03 AM
www/web connect funcion or class?
Posted: Fri Apr 27, 2007 03:44 AM
You can try this:

// author: ssbbs
// 下載更新紀錄
Func    GetModify()
Local   cFile   := "d:\myapp\tmp\a1.exe"
        If File(cFile)
           fErase(cFile)
        EndIf
        If URLDownloadToFile( 0, "www.myside.com/down/a1.exe", cFile, 0, 0 ) == 0
           msgInfo( "檔案取回成功", "OK" )
        Else
           MsgStop( "修改紀錄檔無法讀取!", "警告!" )
        EndIf
Return  NIL
DLL32   FUNCTION URLDownloadToFile(pCaller AS LONG, 
                                                         szURL AS STRING, 
                                                         szFileName AS STRING,
                                                         dwReserved AS LONG,
                                                         lpfnCB AS LONG);
        AS LONG PASCAL;
        FROM "URLDownloadToFileA";
        LIB "urlmon"
line ID: ssbbstw

WeChat ID: ssbbstw
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
www/web connect funcion or class?
Posted: Fri Apr 27, 2007 07:07 AM

Need FREELIBRARY( hLib ) ?

Thanks !
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion