BMH Online

  
 
     
Since I began my website here on Neocities back in June 2020, I had a few stumbling blocks and things to figure out, and when I did, I thought it would be helpful to others if I documented what I did.

So far I have the following:

  • Webcam
  • Page Not Found
  • How I organise my website behind the scenes [Coming soon]
  • How I created the Audio page [Coming soon]

If there's a feature on my website that you're curious about feel free to get in touch and I will be glad to either help you out, point you in the right direction or all of the above along with putting the details here.

 
  Webcam...

[31 July 2020]

 
How I added the Webcam feature to my website.

Webcam

One of the first things I wanted to do with my website at Neocities was to (re)add a webcam. Back in the 2000s when I was new to the internet with my AMD K6-2 computer running Windows 98 and connected via dial-up I had a Creative webcam. The software included with that had the feature of being able to upload images via FTP, so I soon made use of that.

Fast forward 20 years and I no longer have that webcam, or that computer, and my current webcam doesn't include that FTP facility. There were also few other things lacking and issues I needed to overcome, and if you're interested in adding a Webcam page to your website here is the How2:

Table of Contents:
  • FTP access (via Neocities?)

    • SSL

  • Webcam software

  • Router settings

  • The webcam page

  • Further settings

    • The Gallery

    • Scheduling

  • A new issue

FTP access:

The first issue is that Neocities' hosting lacks FTP (File Transfer Protocol) which is the means by which I'm familiar with. If you have a free account at Neocities then you'll be dragging and dropping your files to upload them, right? My way around this for the Webcam is to use another webhosting service to upload my webcam images to. (There are likely ways to do it all with Neocities if you have a premium account).

SSL:

An issue I found with my other hosting service was that it is not SSL-enabled. Basically your Neocities address begins with https:// rather than http:// with the s denoting the SSL security. I would have to pay extra with my other hosting to enable this so that I could embed my webcam image in a Neocities page (Neocities doesn't allow you to embed a page or image from a http:// location). My way around this is to have my webcam page hosted on my other service; my Neocities site simply links to it and most visitors are none-the-wiser.

Webcam software:

I found and tried a number of webcam softwares that claimed to do the trick, but sadly there are a lot of out-of-date review sites out there, and software that doesn't work with newer systems (running Windows 10). I found Yawcam, however, to do the trick and downloaded 0.6.2* and provided it with my hosting service's FTP settings.

*They have recently released v.0.7.0 which I have yet to install.

I have Yawcam set to upload an image (called out.jpg by default) every 30 seconds.

One particular setting that might go unnoticed is this one in FTP > Advanced settings:

Upload temporary filename and rename.

This helps to ensure a viewer's browser doesn't try to display a half-uploaded image, i.e. while Yawcam is still uploading the frame. As the setting suggests, it uploads the frame with a temporary filename, and once complete it renames it, this is because renaming is quick whereas uploading might be slow or delayed.

I also have the following settings in place: Stay connected, and Silent retry on connection error:

Once set up, you can click to enable Ftp from the main window (Control panel) and then check for errors in the Console tab there:

Router settings:

I then hit a stumbling block. The webcam worked briefly and then nothing would upload. I found it was necessary to change a setting on my broadband router. Specifically, I had to log into my router and enable UNPN

To do this on my Technicolor router I went to:
Toolbox, Game & Application Sharing > Universal Plug and Play

The webcam page:

So far this gets your webcam image uploaded, but you need a page to display it on. As mentioned at the start, assuming you have a free account at Neocities and are using FTP as per this How2, you may need the page at the same place as your image hosting, or if that hosting is SSL-enabled then you can have it at Neocities.

That basic requirement of the page is that it loads a new frame every 30 seconds to match your Yawcam upload interval. Alternatively you can require that your visitors refresh the page themselves, such as by pressing F5 on their keyboard.

Note: Refreshing/reloading the page isn't actually all that reliable since each frame can be similar to the last and the browser may determine it is too similar to the last and use its cached copy rather than download a fresh new one. This varies by browser and I've not looked into this issue any further.

Rather than have my whole webcam page refresh, I created a page (webcam.html) with only the 640x480 webcam image on and set that page to refresh using the following in the HTML:

 <meta http-equiv="refresh" content="30">

I then embedded that page in my Webcam (index.html) page as an iframe:

<IFRAME WIDTH=640 HEIGHT=480 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR="#000000" SRC="webcam.html">

There is likely a way to instruct an image on a page to reload but I haven't looked into this.

Further settings:

The Gallery:

I also have Yawcam save a copy of each frame to my computer. I then scroll through the images at the end of each day to pick out the ones of interest to share in my Gallery.

Scheduling:

I set a schedule in the Yawcam settings (for both FTP and File):

I particularly like how you highlight the boxes green to enable the camera for that time-slot on each day.

The introduction slideshow:

Since any given frame from the webcam typically has a plain image from my garden and may not show things as a hive of activity, I created a .gif slide show that loads first (making use of some of those webcam highlights I grab at the end of each day) and once the viewer clicks it they proceed on to the 'live' image. I create a new slideshow every once in a while to give returning visitors something new to see.

If you have a Webcam page on your website I will be keen to see it; let me know!

A new issue:

Once my webcam goes to sleep at the end of the day/scheduled period I manually upload a "Webcam Offline" image (via FTP) to replace the out.jpg file created by Yawcam:

When I came to do this recently I was presented with an error message:

421 There are too many connections from you internet address.

Sure enough, Yawcam had been reporting the same in the Console tab. I've not yet figured out how to resolve this. I can't find any setting at my hosting company to overcome this. The webcam worked briefly today, but then reached the limit of the number of connections as implied by the error. Perhaps running a webcam each day (uploading an image every 30 seconds via ftp) is reaching some limit; perhaps with it being the end of the month as I encounter this I've reached a monthly quota, but as I say, it worked briefly today.

I have a counter on the Webcam page to give me an idea about demand; perhaps the page is receiving too many requests, but apparently I have unlimited bandwidth on my hosting service.

That's all for now on this topic; I hope you've found it interesting or useful.

[Back to Top]

 
  Page Not Found...

[23 July 2020]

 

Each Neocities website is given a not_found.html page by default. You can customise this if you want. However, here's a tip:

If you place any image on this page you can't just refer to it as: any_image.jpg

If you do so, and that image is in the parent directory along with the not_found.html file, that image will only load for 'missing' pages that are sought after in the parent directory. If a visitor tries to access a 'missing' page from another directory the image will fail to load.

I discovered this when I added Brian the Robot to my not_found page:

Solution:

You must refer to the image as https://[your_site].neocities.org/[any_image].jpg

i.e. giving its full address on the internet.

Further queries:

What else to add to a not_found page to get a visitor back on track? "Please click Back on your browser"? "Please contact the webmaster"?

[Back to Top]

 
  How I organise my website behind the scenes...

Coming soon...

I will provide some tips I hope will help those new to Neocities, along with some guidance for those getting in a muddle or who are overwhelmed by a mass of html files and graphics cluttering things up behind the scenes, something like this:

Hopefully such advice will help you avoid or correct those dreaded missing images and pages not found.

[Back to Top]

 
  How I created the Audio page...

My Audio page, or rather the 'Audio Player' I created there, was somewhat tricky to get working but the method I used (one I use in a similar effect elsewhere) might well be useful to others.

I hope to document the process here soon.

[Back to Top]