An Interview With Erik Karey On phpBayAds

Yesterday, Erik Karey released phpBayAds, his eBay ads script, for free to the public. Think of phpBayAds as a self-hosted version of the old AuctionAds program. Erik was kind enough to answer some questions I had about his new release. phpBayAds

With the wild popularity of BANS and phpBay Pro these days it seems like you’ve hit a gap in the marketplace for eBay affiliates. Can you take a minute to describe what phpBayAds does for those that haven’t heard yet and who is most likely to benefit from using it?

I’ve noticed the increase in the popularity of the eBay affiliate program for awhile now and I’ve even started using phpBayPro on a few websites of mine and found great success with it. I also noticed a lot of press on AuctionAds (now ShoppingAds) and it’s shortcomings.

All of these things got me thinking about what type of products I could develop to capitalize on the publicity surrounding the eBay affiliate program which eventually led me to creating phpBayAds.

phpBayAds lets you create adsense-styled ads that feature images and links to eBay auction products using your own eBay Affiliate ID. So when a user clicks on the ad and either makes a purchase or signs up for eBay you get the commissions.

Although results will vary from site to site, I think phpBayAds can benefit every webmaster who tries it as it adds an additional source of income to your websites. phpBayAds are fully customizable from the color of the links to the color of the border to the size of the ads and can be made to blend well with any and all websites.

What was some of your reasoning behind releasing phpBayAds for free?

When I initially set out to release phpBayAds I planned to sell it for somewhere around $20. However when I got to thinking about it I realized that at least at the start of my development that releasing it for free and getting the largest amount of users using the script is to my benefit.

I truly want this script to succeed and to do that I need people to use it and I need people to provide me with feedback. I’m hoping that as the script gets more exposure and as I add features that I may release a low cost Pro version which would include more features and functionality.

What are some of the benefits/disadvantages to you as a developer in making people run the script on their own server?

I think the main advantage of being able to run this script on your own server is that you are in full control. Your ads will always be running as long as your own web host is running. You don’t have to rely on any 3rd party website.

In the future as phpBayAds grows in popularity I would like to offer a hosted version for a low monthly cost which would let those less technical users also use the script.

What’s in store for future releases?

I have a number of features that I’d love to add as long as phpBayAds grows in popularity.

One major feature that I plan to add in the near future is reporting. I want to be able to track all of the clicks going through the ads, show what keywords are performing, what ad sizes are working best and present it all in one useful control panel.

As I mentioned above I’d also like to offer a hosted version of the script and perhaps additional ad sizes.

Lastly I’d like to make the ads more configurable by allowing you to set whether or not the ads should have images, price range of the items, geotargetting and more!

The future is bright for phpBayAds as long as people find it useful.

I want to thank Erik for taking the time to answer my questions. You can learn more about phpBayAds and download it for free over at his blog.

Parse Yahoo Weather Data With PHP

The Yahoo! Developer Network offers all sorts of excellent APIs, RSS feeds and other resources for web developers. I’ve written in the past about using their stock quote CSV files to get stock updates and today I’ll show you a really short piece of code to gather weather data directly from Yahoo! Weather.

The code below is pretty simple but it relies on Magpie to handle the RSS stuff. I’ve written about Magpie before if you’re interested in learning more. The trick with these weather feeds from Yahoo! is stripping out the current weather and the forecast from between the bizarre HTML markup they’ve put around it all. This chunk of code should take care of that for you.

<?php
	include("rss_fetch.inc");

	$zipcode = "44101";
	$feed = fetch_rss("http://xml.weather.yahoo.com/forecastrss?p=".$zipcode);

	if ($feed and !$feed->ERROR)
	{
		$items = array_slice($feed->items, 0);
		foreach ($items as $item)
		{
			$arr_weather = explode('<br />', str_replace('<BR />', '<br />', str_replace('<p />', '<br />', $item['description'])));
			$arr_forecast = explode('-', $arr_weather[5]);

			$current_weather = trim($arr_weather[2]);
			$forecast_weather = trim($arr_forecast[1]);
		}
	}
?>

When this is done you’re left with a variable named $current_weather that contains the weather as it exists at that moment and another variable named $forecast_weather with the current day’s weather forecast.

Fore Score Golf Stats - Course WeatherI’ve used this chunk of code severals times on intranets I’ve built. A variation on this code that includes weather icons helps power some features at Fore Score Golf Stats as well. A big use there is to show the current weather at any courses a user has played at (seen on the right).

If you want to read some more about Yahoo’s weather RSS feeds then check out the weather section of their Developer Network.

January 10th, 2008 | PHP, Programming | 1 Comments

Simple PHP Function For Inline Comparisons

This will probably seem trivial and obvious to most PHP users out there but some of you might find this simple function useful. There are a lot of times when you’ll want to do a quick comparison and then, for example, give an HTML element a specific class based on what you found. The following is a short and sweet function I include in all of my projects to make this easy to do:

<?php
	function check_equal($val1, $val2, $response)
	{
		if ($val1 == $val2)
		{
			return $response;
		}
	}
?>

Here’s an example of this function in action:

<?php
	echo '<div'.check_equal($user, 1, ' class="author"').'>';
?>

In the example above, whenever the value of $user is equal to 1 then the div will be written out with the class of “author” attached to it. Now I can make some changes to my CSS to style that div differently based on the value of the PHP variable $user.

January 1st, 2008 | PHP, Programming | 0 Comments

A Programmer’s Alternative To BANS

For those in the affiliate marketing game, there is apparently a decent amount of money to be made using the affiliate program provided by eBay. The U.S. eBay affiliate program (which you can sign up for at Commission Junction if you’re interested) pays when visitors you drive to the popular auction site meet one of these conditions:

Action Pay
A visitor becomes a confirmed, active user of eBay.com within 30 days of registration. $25.00
A registered user places a Winning Bid. 50% of the auction fees

So that’s a really basic and simple overview of the eBay affiliate program. This post is really about what you can do to convert with that program though. For most people, the easiest way to drive traffic to eBay through your affiliate account is to setup an “instant store” using the Build A Niche Store software. It’s better known as BANS.

BANS has become incredibly popular because it is simple to use and has proven successful for a lot of people in the eBay affiliate program. When you install BANS you choose what eBay categories you’re interested in making a store for and the software does the rest. You can see a list of stores people have created on the BANS site to get an idea of what the program is capable of. BANS costs $97 and comes with a lot of perks for that price. It’s especially well-suited for those who don’t quite have the technical knowledge to manipulate eBay’s RSS feeds on their own.

If you’re one of those people who might want a little more control over their own eBay store there’s an alternative in phpBay Pro. phpBay Pro is an API for PHP that wraps around the eBay RSS feeds and parses the results for you. It also encrypts links and images from eBay which is useful if you’re concerned about security in regards to your store and search engines.

With phpBay Pro you can make a store built around keywords as opposed to the pre-defined categories available on eBay. phpBay Pro is also cheaper than BANS with a $39 price tag for the API alone. For an additional $20, you can also buy a WordPress plugin that lets you embed eBay auctions directly into posts on your blog.

I purchased phpBay Pro for myself over the holiday weekend to use on an idle domain name I own (it’s Nintendo Wii related, so it’s probably a good candidate for this). To give you an idea of how easy phpBay Pro is to use here’s an example of what the code looks like to pull down Wii related auctions:

<?php
require_once("ebay.php");
$keywords = "nintendo wii";

// create an instance of the ebay class
$ebay = new ebay();

// set the number of listings to display per page
$ebay->eb_frpp = "10";

// create the listings content
$ebay->listings($keywords, $category);

// display the listings
echo $ebay->html;
?>

If anyone has any experience with either BANS or phpBay Pro I’d love to hear about it in the comments of this post.

December 26th, 2007 | Money, PHP, Programming | 15 Comments

Build Your Own RSS Feeds With FeedCreator

FeedCreator, by Kai Blankenhorn, is a great PHP class to use when you want to build RSS feeds from your own content. I use this class extensively on all of the sites that make up Jack’s Sports Report and have been really happy with it.

It’s painfully easy to use and it takes care of any caching requirements automatically for you. Here’s a list of FeedCreator’s main features:

  • Creates valid feeds according to RSS 0.91, 1.0 or 2.0 as well as PIE 0.1 (deprecated), OPML 1.0, Unix mbox, ATOM 0.3, or customizable HTML or Javascript format
  • Configurable feed caching
  • Feed image
  • Includes almost all RSS 0.91 attributes
  • Intelligently truncates strings when needed

There’s a really good piece of example code on the FeedCreator site if you get stuck.

November 8th, 2007 | PHP, Programming | 0 Comments

A Decent RSS Parser for PHP

I use MagpieRSS a lot when I’m trying to parse RSS files with PHP. It forms the backbone for the spider that drives all of the sites that make up Jack’s Sports Report as well other small tasks here and there. For example, I use MagpieRSS to parse weather feeds for Fore Score Golf Stats so our users can get real-time information on their local weather and the conditions at their favorite courses.

There’s a major competitor to Magpie in this space called SimplePie that a lot of people prefer. Development on Magpie has basically stalled since late last year while SimplePie improvements have been coming fast and steady for awhile. You probably can’t go wrong using either one. I stick with Magpie mostly because it’s what I’m familiar with. Magpie is also built straight into WordPress now which might be advantageous to a lot of plugin developers.

A person could most certainly write their own RSS parser using PHP5’s XML functions. I prefer using a library because it handles most of the dirty work for me and it saves on time.

October 3rd, 2007 | PHP, Programming, WordPress | 2 Comments

Yahoo Has Changed the Location of the Stock Quote CSV

Yahoo appears to have changed the location of their stock quote CSV files. Since the most popular post on this blog is my explanation of how the Yahoo stock quote CSV file works I thought I better mention the change.

The old location was:

http://quote.yahoo.com/d/quotes.csv?s=SYMBOL&f=sl1d1t1c1ohgv&e=.csv

The new location is:

http://download.finance.yahoo.com/d/quotes.csv?s=SYMBOL&f=sl1d1t1c1ohgv&e=.csv

September 5th, 2007 | PHP, Programming | 0 Comments