Jump to content

TCP send data to webserver


Recommended Posts

Greetings,

I need to send data to a .PHP page. I figured out the HTTP header and tested it by sending it manually in Telnet (command prompt). It worked fine, but AutoIt isn't working. I wrote this code.

TCPStartUp()
$socket = TCPConnect("www.fakesite.com", 80)
TCPSend($socket, "GET /log.php?username=test&key=test HTTP/1.0\r\nConnection: Close\r\n\r\n")
TCPCloseSocket($socket)
TCPShutDown()

$socket is always equal to -1, what should I do? Thanks in advance!

Regards,

Eradicator

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...