Hey José,
I hope you won't mind... but I'd like to request a libcurl header conversion from C++ to PowerBASIC... if you have some time??
http://curl.haxx.se/libcurl/
I might be able to make a donation, if that would help encourage you??
Let me know! : )
Sorry, but I never have been interested in that library. With Windows you can use IXMLHTTPRequest and/or WinInet.
I was looking for a working FTPeS (Explicit FTP) library (or code)...
Hi Jim,
John asked me to post this link for you :)
http://www.allbasic.info/forum/index.php?topic=232.msg2566#msg2566
I went to the Script Basic link... actually went over to the download link... but was unable to figure out the latest version or how to install...
Oh well, no problem... I found this nifty FreeBasic libcurl code (and the libcurl gets compiled into the exe, no need for dll):
'' FreeBasic Curl HTTP Get example
#include once "curl.bi"
#include once "crt/string.bi"
'' this callback will be called when any data is received
Private Function write_callback cdecl _
( _
ByVal buffer As Byte Ptr, _
ByVal size As Integer, _
ByVal nitems As Integer, _
ByVal outstream As Any Ptr _
) As Integer
Static As ZString Ptr zstr = 0
Static As Integer maxbytes = 0
Dim As Integer bytes = size * nitems
'' current zstring buffer too small?
If( maxbytes < bytes ) Then
zstr = Reallocate( zstr, bytes + 1 )
maxbytes = bytes
End If
'' "buffer" is not null-terminated, so we must dup it and add the null-term
memcpy( zstr, buffer, bytes )
zstr[bytes] = 0
'' just print it..
Print *zstr
Return bytes
End Function
'' init
Dim As CURL Ptr curl = curl_easy_init( )
If( curl = 0 ) Then
End 1
End If
'' set url and callback
curl_easy_setopt( curl, CURLOPT_URL, "freebasic.net" )
curl_easy_setopt( curl, CURLOPT_WRITEFUNCTION, @write_callback )
'' execute..
curl_easy_perform( curl )
'' shutdown
curl_easy_cleanup( curl )
http://www.marshallsoft.com/fce4pb.htm
I can highly recommend SocketTools, which includes the different FTP flavors and most of the other common Internet protocols in a PowerBASIC-friendly set of libraries.
https://www.catalyst.com/products/sockettools/library/index.html
Quote from: Eros Olmi on September 20, 2013, 05:28:38 AM
http://www.marshallsoft.com/fce4pb.htm
Doesn't appear that FCE4PB supports FTPS.
Quote from: Raymond Leech on September 20, 2013, 04:46:41 PMI can highly recommend SocketTools, which includes the different FTP flavors and most of the other common Internet protocols in a PowerBASIC-friendly set of libraries. https://www.catalyst.com/products/sockettools/library/index.html
Thx, I forgot I own v7 of SocketTools... but now I'm really excited about FreeBasic allowing me to include libcurl without an external dll.