Add to Google! Add to My Yahoo! Subscribe with Bloglines Pluck Add to NewsGator

January 2007

Visual Basic - HTTP Post Function

11

January

Public Function HTTPPost(ByVal myURL As String, ByVal myPost As String)

Dim temp As String
temp = “”
Try

Dim myURI As New Uri(myURL)
Dim request As Net.WebRequest = Net.WebRequest.Create(myURI)
Dim encoding As New System.Text.ASCIIEncoding()
Dim myByte As Byte() = encoding.GetBytes(myPost)
request.Method = “POST”
‘ Set the content type of the data being posted.
request.ContentType = “application/x-www-form-urlencoded”
‘ Set the content length of the string being posted.
request.ContentLength = myByte.Length
Dim newStream As IO.Stream = request.GetRequestStream()
newStream.Write(myByte, 0, myByte.Length)
newStream.Close()
Dim response As Net.HttpWebResponse = CType(request.GetResponse(), Net.HttpWebResponse)
Dim datastream As IO.Stream = response.GetResponseStream
Dim reader As New IO.StreamReader(datastream)
Dim responseFromServer As String = reader.ReadToEnd()
temp = responseFromServer
reader.Close()
datastream.Close()
response.Close()

Catch

MsgBox(Err.Description)

End Try
Return temp

End Function


Visual Basic - HTTP Get Function

11

January

Public Function HTTPGet(ByVal myURL As String)

Dim temp As String
temp = “”
Try

Dim myURI As New Uri(myURL)
Dim wr As Net.WebRequest = Net.WebRequest.Create(myURI)
wr.Credentials = Net.CredentialCache.DefaultCredentials
Dim response As Net.HttpWebResponse = CType(wr.GetResponse(), Net.HttpWebResponse)
Dim datastream As IO.Stream = response.GetResponseStream
Dim reader As New IO.StreamReader(datastream)
Dim responseFromServer As String = reader.ReadToEnd()
temp = responseFromServer
reader.Close()
datastream.Close()
response.Close()

Catch

MsgBox(Err.Description & vbCrLf & myURL)

End Try
Return temp

End Function


PHP Open Source Timesheet System

04

January

Timesheet.php is a PHP application designed to keep track of the hours worked by multiple people on multiple projects. It allows users to log in through their web browser and manage the times that they are clocked on or clocked off.”

The application is easy to install if you have mild experience with PHP and MySQL.