Copyright: (c) Peak Systems 2003


UI-WebServer

UI-WebServer is a simple web server plug-in for UI-View32. It makes available some dynamic pages that it creates automatically in response to requests, and it can also make available any other pages that you may wish to create.

UI-WebServer is accessible from the PC on which it runs, and from other PCs on your LAN. It will only be accessible to other internet users if you make your PC accessible from the internet. How to do that is beyond the scope of this help, but the procedure would be the same for UI-WebServer as for any other web server.

Setting Up

For normal use, no set-up is required. UI-WebServer uses the default http port, which is 80. If you wish to use a different port, then you can change it in Setup. Note - if you use a different port, then all requests to the server need to include the port number, because browsers always assume port 80.

Using UI-Webserver

Select UI-WebServer from the UI-View32 File menu. When the server is inactive, the program icon is red, when it is active it is green. When you minimize UI-WebServer, it goes into the systray. To restore it, left click its systray icon, right clicking the systray icon gives you a pop-up menu. The program window shows details of the requests received by the server. The information is - date and time, session number, remote IP address:port, details of request.

Open your browser, and browse to the address http://localhost. If UI-WebServer is using a port other than 80, then you must specify the port number, e.g. http://localhost:1234. You will see the server index page, with options along the top to select other pages. Play with it for a few minutes, and it should be obvious what is available.

To access UI-WebServer from another PC on your LAN, the address to put in the browser is the host name or IP address of the PC on which UI-WebServer is running. For example, my UI-WebServer runs on a PC with a host name of nwhub and an IP address of 192.168.0.3, so the address would be http://nwhub or http://192.168.0.3. Again, if UI-WebServer is using a port other than 80, then you must specify the port number.


UI-WebServer Pages

UI-WebServer can serve both dynamic and static pages.

Dynamic Pages

UI-WebServer can dynamically create some special pages. The pages are based on a tokens system, so the user has great freedom in altering the layout and appearance of the pages. The special pages are -

index.html (also accessible as allrf.html) - This is the server index page. It lists all stations heard on RF.

wxrf.html - this is the page displayed when you select "RF WX stations" on the index page.

mobilesrf.html - this is the page displayed when you select "RF Mobile stations" on the index page.

all.html  - This is the page displayed when you select "All Stations" on the index page.

wxall.html - this is the page displayed when you select "All WX stations" on the index page.

mobilesall.html - this is the page displayed when you select "All Mobile stations" on the index page.

bulletins.html - this is the page displayed when you select "Bulletins" on the index page.

info_call.html, infomobile_call.html, infowx_call.html - these are the pages displayed when you select a callsign from one of the lists, or use the Search option on the index page. Which page is used depends on whether the selected station is a normal, mobile, or wx station.

A default file is supplied for each of these pages, and there are comments at the top of each of the files saying what tokens can be used in the file. These files live in the Special Pages folder. You can change the files as much as you want, and choose which of the available tokens you want to use.

How Dynamic Pages Work

The server receives a request from a client for a page that it recognises from its name as being a dynamic page.

It fetches the data needed for the page from UI-View32.

It reads the file for the page from the Special Pages folder, merges it with the data from UI-View32 by replacing the various tokens with the corresponding data, and writes a temporary file in the HTML folder.

The temporary file is then sent to the client, and deleted when the send is completed. Note (this is important) - because the temporary file is put in the HTML folder, paths to other files in the HTML code, e.g. graphics files, should be relative to the HTML folder.

Static Pages

UI-WebServer can also serve any static pages that you wish to make available. You must put these pages in the HTML folder, which is a false root folder, or in sub-folders within the HTML folder. Static pages are scanned for tokens before they are sent. Info.html, supplied with the program, is an example of a static page; it contains comments about what tokens are available to be used in static pages.

Index.html

UI-WebServer's default page is index.html. (A web server's default page is the page that it serves when no specific page is requested.) If you wish to change index.html to a completely different page - perhaps a general introduction/menu page or a frame set - then allrf.html can be used to provide the information that the default version of index.html provides. (If that doesn't make sense now, then it probably will do if you make major changes to index.html!)

Default And Alternative Pages

The Default Pages folder contains copies of the original Special Pages and HTML folders. So, if you edit the original pages, and mess them up, you can easily restore them. For more info read Default Pages.TXT in the folder.

The KK6RW Pages folder contains some alternative pages, using frames, designed by Randy, KK6RW. If you want to use these pages, read KK6RW Pages.TXT in the folder.


Setup

Port - allows you to change the port used by UI-WebServer. Don't change the port unless you understand what you are doing, and have a good reason for doing it. The default port for a web server is 80, if you use a different port, then users will have to specify the port number when they use the server, e.g. http://anaddress:8080.

If you do change the port number, then it is recommended that use 1024 or higher.

Start minimized - If this option is checked, then UI-WebServer will minimize itself in the systray when it starts up.