Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/core/open_close_dbase_connection.php on line 0

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/A-Simple-Server/index.php(0) : eval()'d code on line 22

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/A-Simple-Server/index.php(0) : eval()'d code on line 35

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/get_ad_type_position.php on line 0

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/load_ads.php on line 0

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/sponsor_found.php on line 0

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/freehos1/public_html/projectus/scripts/load_links.php on line 0

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/A-Simple-Server/index.php(0) : eval()'d code on line 161

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/A-Simple-Server/index.php(0) : eval()'d code on line 164

Deprecated: Function split() is deprecated in /home/freehos1/public_html/projectus/A-Simple-Server/index.php(0) : eval()'d code on line 167
vb codemapping from http request
projectus.freehost7.com:UG and PG level projects,mini projects and many more here ...



Visual basic code for Mapping from http request to service request.

 

' load settings from the registry

txtPortNo.Text = GetSetting(App.EXEName, "Config", "Port",8080)

txtDefaultDoc.Text = GetSetting(App.EXEName, "Config", "DefaultDocs", "index.html")

chkLogConnectionRequest.Value = GetSetting(App.EXEName, "Logs", "Requests", 0)

chkLogStartStop.Value = GetSetting(App.EXEName, "Logs", "Server", 0)

lblIPAddress.Caption = sckServer(0).LocalIP

' Add the categories to be displayed

lstViewCat.ListItems.Add , , "Setup", 1

lstViewCat.ListItems.Add , , "Folders", 2

lstViewCat.ListItems.Add , , "Logs / Stats.", 3

' Load the virtual directories from the registry, if none exist then

' create a root directory

If Len(GetSetting(App.EXEName, "VirtualDirs", "Root", "")) > 0 Then

' load all the virtual dirs from the registry

AllSettings = GetAllSettings(App.EXEName, "VirtualDirs")

' Add each entry to the list.

For Index = LBound(AllSettings, 1) To UBound(AllSettings, 1)

Set NewEntry = lstvwVirtualDirs.ListItems.Add(, AllSettings(Index, 0), AllSettings(Index, 0))

NewEntry.ListSubItems.Add , , AllSettings(Index, 1)

NewEntry.ListSubItems.Add , , CStr(DirExists(AllSettings(Index, 1)))

Set NewEntry = Nothing

Next

Else

' default the root directory to the application's path

Set NewEntry = lstvwVirtualDirs.ListItems.Add(, "Root", "Root")

NewEntry.ListSubItems.Add , , App.Path

NewEntry.ListSubItems.Add , , "Yes"

SaveSetting App.EXEName, "VirtualDirs", "Root", App.Path

End If

End Sub

Public Function ProcessDataRequest(intIndex As Integer, strData As String) As clsHeader

Dim Header As New clsHeader

Dim strbuf As String

Dim Params() As String

Dim Values() As String

Dim Index As Integer

' Get the request data

Header.Request = Left(strData, InStr(1, strData, vbCrLf) - 1)

' Get the parameters data

Params = Split(Right(strData, Len(strData) - InStr(1, strData, vbCrLf) - 1), vbCrLf)

' Look at each parameter and store it...

For Index = 0 To UBound(Params)

Values = Split(Params(Index), ":")

If UBound(Values) = 1 Then

Header.Parameters.Add Values(0), Right(Values(1), Len(Values(1)) - 1)

End If

Next

' if the request was a get operation...

If Left(Header.Request, 3) = "GET" Then

' Define the file requested.

Header.FilePath = Right(Header.Request, Len(Header.Request) - 4)

Header.FilePath = Left(Header.FilePath, InStr(1, Header.FilePath, " HTTP") - 1)

' if there is a ? present - ignore it and everything after it (after a POST)

If InStr(1, Header.FilePath, "?") <> 0 Then

Header.Command = Right(Header.FilePath, Len(Header.FilePath) - InStr(Header.FilePath, "?"))

Header.FilePath = Left(Header.FilePath, InStr(1, Header.FilePath, "?") - 1)

End If

ElseIf Left(Header.Request, 4) = "POST" Then

' We treat the POST the same as a GET

Header.FilePath = Right(Header.Request, Len(Header.Request) - 5)

Header.FilePath = Left(Header.FilePath, InStr(1, Header.FilePath, " HTTP") - 1)

Else

' Don't know how to handle other requests

Header.FilePath = ""

End If

' Return it

Set ProcessDataRequest = Header

End Function