VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1560
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3945
   LinkTopic       =   "Form1"
   ScaleHeight     =   1560
   ScaleWidth      =   3945
   StartUpPosition =   3  'Windows Default
   Begin MSWinsockLib.Winsock Winsock1 
      Left            =   1680
      Top             =   120
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
   Begin VB.TextBox Text4 
      Height          =   285
      Left            =   120
      TabIndex        =   4
      Text            =   "/temp.php"
      Top             =   1200
      Width           =   3735
   End
   Begin VB.TextBox Text3 
      Height          =   285
      Left            =   120
      TabIndex        =   3
      Text            =   "Email Address"
      Top             =   840
      Width           =   1455
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   120
      TabIndex        =   2
      Text            =   "Last Name"
      Top             =   480
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   120
      TabIndex        =   1
      Text            =   "First Name"
      Top             =   120
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Connect To PHP"
      Height          =   255
      Left            =   1680
      TabIndex        =   0
      Top             =   840
      Width           =   2175
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'This will send an email to the address in text3 and will include all variables
Private Sub Command1_Click()
Winsock1.Connect "www.phototix.com", 80
End Sub

Private Sub Winsock1_Connect()
    Dim strHttpRequest As String
    Dim strData As String
    strData = "Var1=" & Text1 & "Var2=" & Text2 & "Var3=" & Text3
    strHttpRequest = "POST " & Text4 & " HTTP/1.1" & vbCrLf & _
                     "Host: www.phototix.com" & vbCrLf & _
                     "Content-Length: " & Len(strData) & vbCrLf & _
                     "Content-Encoding: application/x-www-from-urlencoded" & vbCrLf & _
                     vbCrLf & strData & vbCrLf & _
                     "cache -Control: no -cache" & vbCrLf & vbCrLf & strData
                    
    Winsock1.SendData strHttpRequest
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim Str As String
Winsock1.GetData Str
MsgBox "Server Reply:" & vbCrLf & vbCrLf & Str
End Sub
