Pinterest Stumbleupon Whatsapp
Ads by Google

One of the coolest things about being an independent journalist is that you’re almost always on top of current events within your field. On the flip side, there’s also a lot of demand on you to get the latest information and news out on the web before anyone else does.

One approach that I’ve seen large, mainstream news organizations like CNN use is to publish a scrolling “breaking news” banner across the top of the web page. This allows editors to publish a news headline even before the writer is finished researching and publishing the article. When you’re writing about breaking news, being first to print is really important, and having a ticker content like this can give you an advantage.

The one problem with banners like this is that traditionally you had to go in and edit the web page in order to update the banner content. I wanted to implement this on my own website, but I thought it would be really cool to have the ability to upload the updates directly from my mobile phone so that it automatically updates the scrolling banner.

I developed a very simple ticker content management approach to doing this using PHP and a free Android FTP client called AndFTP. Although, you can also use just about any FTP client for this approach, such as the USB ones 100 Portable Apps for your USB Stick (for Mac and Win) 100 Portable Apps for your USB Stick (for Mac and Win) Read More Aibek listed, or even the web-based FTP clients 6 Good Online FTP Clients For When You Are On The Road 6 Good Online FTP Clients For When You Are On The Road Read More I wrote about for when you’re on the road. Wherever you can FTP, you can update the banner.

Installing the Banner on Your Website

Many of you that are familiar with basic HTML will recognize the old Marquee code that initiates the scrolling text along the top of your webpage. The code looks like this:

THIS IS A TEST

You’ll need to edit the background and text color, and font styles to match your website and to give it a professional look and feel. I quickly chose colors that sort of match my website format, but it could use some tweaking – as an example, it will do! In its simplest form, the Marquee scrolls the text that you’ve typed into the code. As you can see above, my script has a bold “THIS IS A TEST” in it, so that’s exactly what gets displayed.

Ads by Google

ticker content management

This would require you to edit that code snippet in your page in order to update the scrolling text. To automate this, I replaced the text with a PHP include, and had the PHP script pull text right out of a text file that I called “test.txt”, stored in a subdirectory on the public HTML folder of my web account. This is what that PHP include looks like.

Now, instead of static text stored on your webpage, you’ve got PHP pulling the content of a file stored on your web server. That means that any time the file content changes, your website banner text will also change.

This is great – but again, I don’t want to have to be at my home PC to update the banner text. So, using a text editor on my mobile phone, I created a text file and saved it with the same name as the file stored on my web server. The text file will contain the latest news updates.

ticker content

Any time you make changes to the text file on your mobile device, just fire up your mobile FTP client, such as AndFTP, and upload the new file to the subdirectory on the server where you pointed the PHP include.

ticker content

The old file gets written over, and the new text gets displayed on your website. Now, to update the scrolling banner on your site, just change the text stored in the file on your mobile phone, upload it to your web server, and you’ll see the new text show up.

ticker content management

There are a few more ways you could improve the functionality of this approach, such as syncing a DropBox directory to your web server, and then just dropping the new file to DropBox will update the Marquee. This approach is a little more complicated though, and requires some configuration changes on the web server that you may not have permissions to make.

This solution is fast and easy, and it gives you the freedom to update scrolling text on your site from any location that you have access to FTP and a text editor. Updating your site with the latest news really couldn’t get much easier than that.

Did you try this approach, and did it work on your website? How would you improve the process – is there any way to improve the PHP script? Share your thoughts in the comments section below.

Image Credit: Wally Gobetz

  1. Dom
    May 26, 2011 at 7:43 pm

    Also I forgot to ask:
    are there any equivalents to andFTP for ios?

    • Anonymous
      May 27, 2011 at 12:29 am

      I'm not sure, I discovered the FTP clients I mentioned at the top of the list when I did a searching on the Android Market, but I'm pretty sure the list was quite long. If you're looking for more options, definitely search the Market for "ftp client".

      • Dom
        May 27, 2011 at 7:02 am

        ah that would be where I was going wrong - I searched for ftp server so it gave me programs for file storage on my phone.

        Once again thank you for this great content

  2. Dom
    May 26, 2011 at 7:20 pm

    This post = awesome
    This site  = uber awesome

    • Anonymous
      May 27, 2011 at 12:27 am

      Thanks Dom! Glad you enjoyed it, I always enjoy the positive comments. :-)

  3. Luke
    May 20, 2011 at 2:44 am

    Just for reference, with the current March-Towards-HTML5 underway, the Marquee element is considered obsolete in HTML5 - http://www.w3.org/TR/html5/obsolete.html#the-marquee-element

    • Tina
      May 20, 2011 at 4:25 pm

      Thanks for the heads-up, Luke!

    • Anonymous
      May 21, 2011 at 1:05 pm

       Cool - thanks Luke. Do you happen to know what the replacement is?

  4. Jared Sartin
    May 19, 2011 at 8:31 pm

     What about simply loading the latest tweet in there? You can then text in your twitter posts and not have to http://FTP... thus incorporating any phones that support SMS.

    • Anonymous
      May 19, 2011 at 10:17 pm

       Jared, I love that idea! Not sure how to feed tweets to the text file, although I think there are probably plugins that might work. I know you can tweet-to-post, but I don't know of any plugins that feed tweets to a ticker. I love the concept!

Leave a Reply

Your email address will not be published. Required fields are marked *