FWPPC and FTP
FWPPC and FTP
Hello
I use the function FTP of Enrico
http://67.222.39.232/forums/viewtopic.p ... hlight=ftp
it works well , but dont open the GPR connection .
I add the function GPRSCONNECT and GPRSRELEASE
http://67.222.39.232/forums/viewtopic.p ... prsconnect
They work bat at the line of the FTP function
hCon = INTERNETCONNECT( hInternet, "ip_do_Site_ftp",0, "Usuário","senha", INTERNET_SERVICE_FTP, 0,0 )
hCon return zero .
It is possible use FTP and open automatic the connection ?
Thank in advance
Maurizio
I use the function FTP of Enrico
http://67.222.39.232/forums/viewtopic.p ... hlight=ftp
it works well , but dont open the GPR connection .
I add the function GPRSCONNECT and GPRSRELEASE
http://67.222.39.232/forums/viewtopic.p ... prsconnect
They work bat at the line of the FTP function
hCon = INTERNETCONNECT( hInternet, "ip_do_Site_ftp",0, "Usuário","senha", INTERNET_SERVICE_FTP, 0,0 )
hCon return zero .
It is possible use FTP and open automatic the connection ?
Thank in advance
Maurizio
- Biel EA6DD
- Posts: 680
- Joined: Tue Feb 14, 2006 9:48 am
- Location: Mallorca
- Contact:
Hi Maurizio
I'm using the same functions like you, and are running ok.
Here you have a sample how I'm using the functions to connect to the FTP server via GPRS.
I'm using the same functions like you, and are running ok.
Code: Select all
hGprs:=GprsConnect()
hInternet:= InternetOpen( "HnasMbl", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 )
IF !hInternet==0
WHILE hConnect==0 .AND. nTrys<=3
hConnect:=InternetConnect( hInternet, Trim(Cfg->Ip), Cfg->Puerto, Trim(Cfg->Usr), Trim(Cfg->Psw), INTERNET_SERVICE_FTP, 0, 0 )
nTrys++
...
Ciao Maurizio, hello Biel,
open the GPR connection
this means you have a smartphone.
As I don’t have had a smartphone ever (I am waiting for the HTC diamond – it should arrive the next days) I would be interested how
quick a connection is established.
Maurizio do you think - what I would like to do – you could use FTP to transfer the orders a waiter in a restaurant collects?
Thanks in advance
Otto
open the GPR connection
this means you have a smartphone.
As I don’t have had a smartphone ever (I am waiting for the HTC diamond – it should arrive the next days) I would be interested how
quick a connection is established.
Maurizio do you think - what I would like to do – you could use FTP to transfer the orders a waiter in a restaurant collects?
Thanks in advance
Otto
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: FWPPC and FTP
Maurizio,
This is the code i use with success (including with gprs connection)
This is the code i use with success (including with gprs connection)
Code: Select all
hInternet := InternetOpen( "Anystring", INTERNET_OPEN_TYPE_DIRECT, 0, 0, 0 ) // pocket connexion gprs
IF hINTERNET = 0
MSGINFO("ERREUR CONNEXION INTERNET envoi sortant")
RETURN .F.
ENDIF
hCon1 = INTERNETCONNECT( hInternet, DSITE,INTERNET_INVALID_PORT_NUMBER, DUSER, DPASS, INTERNET_SERVICE_FTP, 0,0 )
IF HCON1 = 0
MSGINFO("ERREUR Création CONNEXION FTP envoi sortant ... Abandon transmission ")
RETURN .F.
ENDIF
HTH
Richard
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: FWPPC and FTP
Forgot to join the defines
here they are below
here they are below
Code: Select all
#define FILE_ATTRIBUTE_READONLY 1
#define FILE_ATTRIBUTE_HIDDEN 2
#define FILE_ATTRIBUTE_SYSTEM 4
#define FILE_ATTRIBUTE_DIRECTORY 16
#define FILE_ATTRIBUTE_ARCHIVE 32
#define FILE_ATTRIBUTE_NORMAL 128
#define FILE_ATTRIBUTE_TEMPORARY 256
//
// access types for InternetOpen()
//
#define INTERNET_OPEN_TYPE_PRECONFIG 0 // use registry configuration
#define INTERNET_OPEN_TYPE_DIRECT 1 // direct to net
#define INTERNET_OPEN_TYPE_PROXY 3 // via named proxy
#define INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4 // prevent using java/script/INS
//
// manifests
//
#define INTERNET_INVALID_PORT_NUMBER 0 // use the protocol-specific default
#define INTERNET_DEFAULT_FTP_PORT 21 // default for FTP servers
#define INTERNET_DEFAULT_GOPHER_PORT 70 // " " gopher "
#define INTERNET_DEFAULT_HTTP_PORT 80 // " " HTTP "
#define INTERNET_DEFAULT_HTTPS_PORT 443 // " " HTTPS "
#define INTERNET_DEFAULT_SOCKS_PORT 1080 // default for SOCKS firewall servers.
//
// service types for InternetConnect()
//
#define INTERNET_SERVICE_FTP 1
#define INTERNET_SERVICE_GOPHER 2
#define INTERNET_SERVICE_HTTP 3
//
// flags for FTP
//
#define INTERNET_FLAG_TRANSFER_ASCII 1
#define INTERNET_FLAG_TRANSFER_BINARY 2
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: