RSS Feeds for PHP based pages

We recently added a PHP based RSS reader in our includes folder for people to start using with their php based pages. It’s a simple tool to use, only 3 lines of code needed (well 2 if you don’t create the $url variable). Anyway here’s an example on how to use it.

[code lang="php"]

[/code]

Now that we have seen it here’s how it works:

  1. The first line loads the library file that does all the heavy lifting
  2. The second line is the URL variable.  You simply need to put your news feed url here.  In this case we are displaying the headlines from the UWGB news site “Inside”.
  3. Last but now least we need to echo out the results of the RSS_Display funtion.

There are four parameters for the RSS_Display function:

  • $url – [Format = URL] – this parameter if the URL to the feed you want to display
  • $size – [Format = Integer] – this determines how many feed items to display (Default 15 items)
  • $site – [Format = True or False] – displays or hides the title and the description of the site (Default false)
  • $showDate [Format = True or False] – displays or hides dates (Default false)
  • $dateFormat [Format = String] – determines how dates are display using the PHP Time Format Manual (Default “Y-m-d H:i:s”)

If you have questions feel free to post comments below.

Avoiding “mailto” link use

It has been a common practice on campus for many years to simply throw an email address on a web page so people can easily be contacted. It’s convenient and makes us more available to our students. However, the practice of adding email addresses to pages has one detrimental side affect.  SPAM. By adding raw email address to pages bots (automated internet robot applications) scrape our pages and collect these email addresses and send them to spammers.

In an effort to make our website a better place we here in web service strongly recommend that anyone adding wanting to add an email address to a page use a technique called obfuscation. We have added a simple javascript based email obfuscation script to our core include folder which will allow you to easily do this.

First you need to add the script into the header (preferably) of your page. If your page is .asp based you’ve probably seen this at the top of your page:

[code lang="asp"]




[/code]

Add the following under the “put extra head html /css after me” part.

[code lang="asp"]




[/code]

After that usage is a snap simply add in the following line instead of your typed email address.

[code lang="html"]

[/code]

The first parameter is the email address you want to use minus the @uwgb.edu portion.  The second parameter is the link text you want to display ( DO NOT USE THE ACTUAL EMAIL ADDRESS ) Even though at this point many of the email addresses that have been posted have already been harvested it’s never to late to start making things harder for the bots.

Exploiting EDU Domains for SEO

In the world of SEO (search engine optimization), an .EDU domain holds a lot of clout. Any URL linked-to from uwgb.edu to is raised up in their own search engine rankings simply because an .edu domain links to them. From the search engine’s point of view, our link adds credibility to that third-party website. This is well known among search engine marketers.

Creating Links to Outside Content

Because of the weight our links give to outside websites, you’ll want to carefully review any website you would like to link to and decide whether or not they are worthy of a link (“endorsement”) from us.

Any link that leaves our domain (uwgb.edu) is what you want to be aware of.

Requests for Links Back

Web Services receives several requests per week to provide outbound links to sites on all sorts of topics. These requests may not even be relevant to our site, but these advertisers are persistent. They’ll even offer to link back to uwgb.edu in return (“from 50 other websites!”). Continue reading