Featured

Huber Audio Blog is finished (almost)

Well it is finally up at http://www.kristinhuber.com. The idea came to me last Friday night or Saturday morning. I presented the idea during a class and somehow everyone thought it was a good idea. Later that day I had the recorder written and I was working on the FTP side of things. The idea is that you press START (talk) then STOP and then SEND to actually send the file to the server. START and STOP were working just fine… but that whole FTP thing was a monster.

Initially I took a look online and found some resources on using sockets to perform FTP. I have been using Windows FTP (command prompt based) and WS FTP for years. I use the ftp functionality of Internet Explorer more and more these days as it is great at passive FTP and provides a nice interface. The problem is I was missing a key piece of knowledge. I started by opening the socket to an endpoint that represented my site. I passed in a user and pass along with setting the mode to binary and then PASV.

The deal with PASV is that the server responds with the IP address and then two other parameters. The 5th parameter you multiply by 256 and the 6th you add on to the result of that. This calculation becomes the port for the data socket. The idea with passive mode is that the remote server opens both of the ports for you and you connect out to them. In the past, active mode, your machine would open a port for the remote server to come back on and grab the file from you. This usually presents some problems with firewalls in most networks including mine.

So now it send the file via FTP. I must have spent 5 hours on that latter portion of the code. Online examples helped, but I always try and rework the code pieces in my own way. In this case the code examples were in C# and were written in a class which was far more robust than I needed. I dumbed it down a little and made it more flat with less structure.

I still need to work on the colors and items like that within the blog itself and it does require Windows Media Player 9 to hear her voice. Oh yeah – she was at Grandma and Pa’s house last night, so she wasn’t able to actually make a recording. Oh well. I will be making the RSS compatible with all of the podcasting aggregators out there, so please stay tuned. I will also remember to post the code.


Trackback  •  Posted by Jason in Uncategorized category

 

Please leave a reply...



You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>