Jump to content

_FTPPutFile()


Recommended Posts

Func UpdateReqFile()
    $Hand = _FTPOpen('AutoFTP')
    _FTPConnect($Hand, $server, $username, $pass, 0, 1)
    If @error Then
        TrayTip("Error", "Connection Failed/Check Firewall", 5)
    Else
        TrayTip("Connected", "Connection via FTP was successful.", 5)
    EndIf

    _FtpPutFile($Hand, @ScriptDir & "\Requests.txt", '/public_html/MSNReq/guestbook.dat')
    If @error Then
        TrayTip("Error", "Upload Failed/Check Firewall", 5)
    Else
        TrayTip("Uploaded", "The update has been uploaded.", 5)
    EndIf
    _FTPClose($Hand)
EndFunc   ;==>UpdateReqFile

As you guys can see, this simply updates a file on my server with a modified version... Works on friends PC, but not mine. I am using Proxifier for my home network, to force all connections through a CCProxy on another machine that is connected to the internet. It's a weird setup, (Long-story). But Proxifier works on everything else, why is putfile failing? It's not due to port issues because I use FTP from my current machine all the time. I just can't figure it out... Is it truly Proxifier's fault? But why does this not work, when regular FTP does?

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

Func UpdateReqFile()
    $Hand = _FTPOpen('AutoFTP')
    _FTPConnect($Hand, $server, $username, $pass, 0, 1)
    If @error Then
        TrayTip("Error", "Connection Failed/Check Firewall", 5)
    Else
        TrayTip("Connected", "Connection via FTP was successful.", 5)
    EndIf

    _FtpPutFile($Hand, @ScriptDir & "\Requests.txt", '/public_html/MSNReq/guestbook.dat')
    If @error Then
        TrayTip("Error", "Upload Failed/Check Firewall", 5)
    Else
        TrayTip("Uploaded", "The update has been uploaded.", 5)
    EndIf
    _FTPClose($Hand)
EndFunc   ;==>UpdateReqFile

As you guys can see, this simply updates a file on my server with a modified version... Works on friends PC, but not mine. I am using Proxifier for my home network, to force all connections through a CCProxy on another machine that is connected to the internet. It's a weird setup, (Long-story). But Proxifier works on everything else, why is putfile failing? It's not due to port issues because I use FTP from my current machine all the time. I just can't figure it out... Is it truly Proxifier's fault? But why does this not work, when regular FTP does?

I don't know but try with

_FTPConnect($Hand, $server, $username, $pass, 0, 1,0x08000000)

and

_FtpPutFile($Hand, @ScriptDir & "\Requests.txt", '/public_html/MSNReq/guestbook.dat', 0x08000000)

;INTERNET_FLAG_PASSIVE 0x08000000 ;Uses passive FTP semantics.

After I had some problems I started using that flag and since then my script has always worked. It might or might not help with your problem.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...