<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Internet Profits Blog &#187; php</title>
	<atom:link href="http://internetprofituniversity.com/blog/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://internetprofituniversity.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 17:49:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Piwik php api</title>
		<link>http://internetprofituniversity.com/blog/using-piwik-php-api/</link>
		<comments>http://internetprofituniversity.com/blog/using-piwik-php-api/#comments</comments>
		<pubDate>Fri, 13 May 2011 18:48:38 +0000</pubDate>
		<dc:creator>Brian Kindsvater</dc:creator>
				<category><![CDATA[Reviews]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://internetprofituniversity.com/blog/?p=345</guid>
		<description><![CDATA[After installing the Piwik web analytics software, and using the default JavaScript tracking, it was quickly apparent that the tracking was miserable.  Using other trackers at the same time, plus of course testing it with my own clicks, hardly anything was registering.  Not sure why I was having a problem with the JavaScript, after [...]]]></description>
			<content:encoded><![CDATA[<p>After installing the Piwik web analytics software, and using the default JavaScript tracking, it was quickly apparent that the tracking was miserable.  Using other trackers at the same time, plus of course testing it with my own clicks, hardly anything was registering.  Not sure why I was having a problem with the JavaScript, after testing it on several websites.</p>
<p>Fortunately, that all changed when I shifted to using the php api tracker.</p>
<p>Here is what I did:</p>
<p>- Deleted the JavaScript tracking code from the tracking text on each page.</p>
<p>- Added the default php tracking code and made the following changes:</p>
<p>1. Added the url to my Piwik tracking script and reference to where the piwiktracker file is.  See the note below for more about this.</p>
<p>2. Added php code to capture the file name of the page being tracked.</p>
<p>3. Changed the image being echoed to refer to the captured file name instead of the default &#8211; This title will appear in the report Actions > Page titles &#8211; which was showing that exact text in my report instead of the actual page title.  My &#8216;fix&#8217; does not show the page title, but the file name, which is perfect for my use.</p>
<p>The change for #2 and #3 results in this php code below the initialization code:</p>
<pre>
function curPageName() {
 return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}

$title = curPageName();

echo '&lt;img src="'. Piwik_getUrlTrackPageView( $idSite = 5, $customTitle = $title) . '" alt="" /&gt;';


</pre>
<p>Remember the idsite has to be different for each site with a number matching the website in the control panel.</p>
<p>Note: Since I have multiple domains to track on one host I installed the piwiktracker file in the root domain of the host (after adding the link to my piwik install in the file) so that this only has to be installed once.</p>
<p>Bottom line: for each domain to be tracked add the new tracking code, remembering to change the idsite number.  That&#8217;s it.  Now it&#8217;s as simple as adding the default JavaScript and piwik is working so much better for me.</p>
<p>Update:</p>
<p>The above is using the api advanced image tracker.</p>
<p>The problem with the advanced image tracker is that it leaves a reference in the source code of each page referring back to the main piwik install.  Not so great for security, it lets anyone find all your sites &#8211; and that includes Google.</p>
<p>But this tracking is solved using the api http request.</p>
<p>The http request has the same problem with the page name, so here is my new code (below the beginning lines telling the script where the piwiktracker file is and where the script is installed:</p>
<pre>
$piwikTracker = new PiwikTracker( $idSite = 1 );
function curPageName() {
 return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}
$title = curPageName();
$piwikTracker-&gt;doTrackPageView($title);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://internetprofituniversity.com/blog/using-piwik-php-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Customize PHPBay</title>
		<link>http://internetprofituniversity.com/blog/how-to-customize-phpbay/</link>
		<comments>http://internetprofituniversity.com/blog/how-to-customize-phpbay/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 00:53:06 +0000</pubDate>
		<dc:creator>Brian Kindsvater</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[PHPBay]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://internetprofituniversity.com/blog/?p=162</guid>
		<description><![CDATA[Using PHPBay is a great way to quickly create an eBay affiliate site.  Unfortunately, that ease also means anyone can create a ton of &#8216;eBay&#8217; sites and pages which, as you might suspect, Google frowns upon.  Anything mass produced &#8211; you might as well assume Google will not like that.
For that reason &#8216;just [...]]]></description>
			<content:encoded><![CDATA[<p>Using <a href="http://internetprofituniversity.com/recommends/phpbay.php">PHPBay</a> is a great way to quickly create an eBay affiliate site.  Unfortunately, that ease also means anyone can create a ton of &#8216;eBay&#8217; sites and pages which, as you might suspect, Google frowns upon.  Anything mass produced &#8211; you might as well assume Google will not like that.</p>
<p>For that reason &#8216;just a PHPBay&#8217; site can be hit or miss in Google.  But there are some code customizations you can do to avoid being quickly fingerprinted as having another thin affiliate site:</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3691511137877196";
google_ad_slot = "3909779892";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong>1. Change up the default template.</strong> You don&#8217;t need everything created by <a href="http://internetprofituniversity.com/recommends/phpbay.php">PHPBay</a> to be a link.  All link and no text?  Change it so only the graphics are linked.  Or maybe just the text.  And change the default text while you&#8217;re at it.</p>
<p><strong>2. Randomize the number of auction listings.</strong> Instead of 10 listings per page, as everyone has, use php to get a random number, say between 5 and 15, then use that variable to control how many listings are shown on a page.  It size of the content and number of links will thus be different each time the Googlebot comes by.</p>
<p>Within your config.php file, do something like this:</p>
<pre># MAXIMUM ITEMS PER PAGE
$randomnum = mt_rand (5,15);
$config['paging_num'] = $randomnum;</pre>
<p><strong>3. Change the default image url used for seo links.</strong> PHPBay by default makes the urls for images to be your domains/images/e/number.jpg.  That &#8216;/images/e/&#8217; is called a footprint.  Within your ebay.php file find this line:</p>
<pre>var $image_replace = "images/e/";</pre>
<p>and change it to something else, such as good keyword.</p>
<p>Then, in your .htaccess file change all references to &#8216;^images/e/&#8217; to your new location.</p>
<p><strong>4. Change the default item listing for seo links.</strong> PHP by default makes each product link &#8216;item-&#8217; followed by the product name.  That, again, is a footprint.  Within config.php, under Basic Options, find this line:</p>
<pre>$config['url_prefix'] = "item-";</pre>
<p>and change it to some other word, such as keyword, followed by the hyphen.</p>
<p>Then, in your .htaccess file, change the references to &#8216;^item&#8217; to your keyword.</p>
<p><strong>5. Make use of built in customization via the settings in the script and in the code added to each page.</strong></p>
<p>Here are the parameters for the page code:</p>
<p>parameter 1 – keyword/phrase<br />
parameter 2 – number to display (this setting is overridden if Paging is turned on)<br />
parameter 3 – category number<br />
parameter 4 – exclusion words (each word to exclude is separated by a space)<br />
parameter 5 – custom id (overrides the global custom id set in config.php)<br />
parameter 6 – true or false to use columns format or not.</p>
<p><strong>6. Use the phpbay api standalone instead of just the function command</strong></p>
<p>Regular function command:</p>
<pre>&lt;?php
require_once(" link to ebay.php ");
phpBayAPI($pagekeyword, "", "", "", "", false);
?&gt;</pre>
<p>Using the api standalone:</p>
<pre>&lt;?php
require_once(" link to ebay.php ");
# phpBayAPI($pagekeyword, "", "", "", "", false);
?&gt;
&lt;?php
# create the class
$ebay = new ebay();
# load the config.php settings
$ebay-&gt;config();
# settings below will override global options set in config.php
$ebay-&gt;eb_exclude = ""; // exclusion words for search separated by space
$ebay-&gt;eb_siteId = 0; // set country to 0 for the us
$ebay-&gt;eb_sabfmts = 0; // 0 for all 1 for auction only 2 for buy it now is a purchase option
$ebay-&gt;sort_by_value = 4; // set sort order 0 is best match 1 is time ending soon 2 is time newly listed
3 is price low first 4 is price hight first 5 is price plus shipping lowest 6 is price plus shipping highest
$ebay-&gt;eb_saprclo = 50; // set mininum price of items
$ebay-&gt;eb_saprchi = 9999; // set maximum price of items
# call the main function
$ebay-&gt;listings("obama", "");
# display the results
echo $ebay-&gt;html;
?&gt;</pre>
<p><strong>7. How to Create a Second Template to Display Results</strong></p>
<p>This is not for using two different templates on the same page.  Rather, if you want to use an alternative template instead of the template on a page:</p>
<p>A. Change the web page reference from ebay.php to a custom name:</p>
<p>require_once(&#8221;/home/xxx/public_html/xxx/phpbay/ebaycustom.php&#8221;);</p>
<p>B. Copy ebay.php to ebaycustom.php</p>
<p>C. Within ebaycustom.php change all references within function getTemplate() from /templates to /templatesnew</p>
<p>D. Copy your templates files to templatesnew, and then make whatever changes you desire to the alternate template.</p>
<p><strong>8. Prevent Google from &#8220;seeing&#8221; your affiliate links.</strong></p>
<p>I have had websites with numerous page 1 rankings in Google, only to see the pages with eBay listings generated by phpBay get heavy penalties while the non-phpBay pages remain highly ranked.  At the same time, I have seen previously penalized pages be resurrected simply by removing the links to eBay.</p>
<p>While removing the eBay links defeats the purpose of being an eBay affiliate, although this technique can still be used to generate Adsense income, the obvious conclusion is a penalty because Google is repeatedly clicking through links and ending up at eBay.</p>
<p>Solution: Since the GoogleBots always respect the robots.txt file instructions, fix your links so they go through a subdirectory and then ban the GoogleBot from accessing that subdirectory.</p>
<p>There are 3 changes to make:</p>
<p>In config.php change the SEO url from</p>
<p>$config['url_prefix'] = &#8220;item-&#8221;;</p>
<p>to</p>
<p>$config['url_prefix'] = &#8220;ban/keyword-&#8221;;</p>
<p>(changing the default item- to keyword- is previously discussed)</p>
<p>Your .htaccess file will be changed so it reflects:</p>
<p>RewriteRule ^ban/keyword-</p>
<p>Then add these lines to your robots.txt file:</p>
<p>User-agent: *<br />
Disallow: /ban/</p>
<p>You can confirm in webmaster tools that Google will not follow a link to the /ban/ subdirectory &#8211; even though that subdirectory physically does not exist.</p>
<p>HOWEVER, my testing using a link to a page in a banned subdirectory is showing that Google ignores the robots.txt instruction even though Google says it will obey.  That page in a banned subdirectory is showing in Google search results.</p>
<p><strong>9. Remove common footprints phpBay uses for links</strong></p>
<p>phpBay adds a country code to the end of every link.  If you just have US links, each link will end &#8220;_US.html&#8221;.  This is an unnecessary fingerprint of the phpBay script.</p>
<p>To change this (and only do this if you are only sending traffic to one eBay country site) around line 450 of the ebay.php file is this code:</p>
<p>$this-&gt;link_url = $this-&gt;site_url . $this-&gt;url_prefix . $this-&gt;urlText($item['title']) . &#8220;_&#8221; . $this-&gt;item_id . &#8220;_&#8221; . $this-&gt;country . $this-&gt;eb_custom_cid . &#8220;.html&#8221;;</p>
<p>change it to:</p>
<p>$this-&gt;link_url = $this-&gt;site_url . $this-&gt;url_prefix . $this-&gt;urlText($item['title']) . &#8220;_&#8221; . $this-&gt;item_id . &#8220;_CUSTOM&#8221; . $this-&gt;eb_custom_cid . &#8220;.html&#8221;;</p>
<p>&#8220;CUSTOM&#8221; is whatever you want to use.  This makes the ending of all links custom to your desires and not the same as tens of thousands of other phpBay sites.</p>
<p>In your .htaccess file change the references to</p>
<p>&amp;country=$3</p>
<p>to</p>
<p>&amp;country=US</p>
<p><strong>10. Customize the No Results Found Statement</strong></p>
<p>In the file forms/form.no.results.php you can customize what statement is returned when no eBay results are found.  Or you can create a blank file to display nothing.  Or you can include an Adsense ad.</p>
<p>The default language is: &#8220;No items matching your keywords were found.&#8221; &#8211; An easy search term to find phpBay sites and niches others are using.</p>
<p><strong>11. Block Google from Seeing Images as Belonging to eBay</strong></p>
<p>All the Googlebot has to do is follow your image urls to discover the images are really hosted on eBay.  Hmmm. Just like above for the links to eBay products, we can use robots.txt to block the Google bots from following the image urls.  (Like above, be warned that testing is showing that Google does not obey robots.txt even though it says it does.)</p>
<p>Since it will not hurt to do this and maybe block some Google insight into your eBay connection, do this:</p>
<p>In ebay.php find this variable near the top of the file:</p>
<p>var $image_replace</p>
<p>and make the full command as follows:</p>
<p>var $image_replace = &#8220;ban/keyword&#8221;;</p>
<p>In your .htaccess file make your image seo rewrite look like this:</p>
<p>RewriteRule ^ban/keyword/(.*)$</p>
<p>As above, make sure the /ban subdirectory is banned in robots.txt</p>
<p><strong>12. Remove Image URL Footprints</strong></p>
<p>Each eBay image ends in &#8220;_0.jpg&#8221;.  This is tricky to change but can be done.</p>
<p>In ebay.php under the setup the RSS class section is this code:</p>
<p># if mod_rewrite for images is enabled, rewrite the url<br />
if ($this-&gt;mod_rewrite == &#8220;1&#8243;) {<br />
$this-&gt;image = str_replace($this-&gt;image_find, $this-&gt;image_replace, $this-&gt;image);<br />
}</p>
<p>Immediately after that code add the following code to add a custom text to the end of each image url.  This way Google cannot look for _0.jpg at the end of an image url to find a footprint:</p>
<p>$footprint = &#8220;.jpg&#8221;;<br />
$footprintreplace = &#8220;-xxx.jpg&#8221;;<br />
$this-&gt;image = str_replace($footprint, $footprintreplace, $this-&gt;image);</p>
<p>&#8220;xxx&#8221; can be any text you want, such as a keyword.</p>
<p>Now, instead of this in your .htaccess code:</p>
<p>RewriteRule ^ban/keyword/(.*)$ http://thumbs.ebaystatic.com/pict/$1 [R,L]</p>
<p>You will want this:</p>
<p>RewriteRule ^ban/keyword/(.*)-xxx.(.*)$ http://thumbs.ebaystatic.com/pict/$1.$2 [R,L]</p>
<p><strong>13. Prevent Google From Following Links Through the phpBay Script</strong></p>
<p>If Google decides not to obey the robots.txt ban, the fallback position is to identify the Google bots and block them within the auction.php file from ever reaching the eBay listings.</p>
<p>By default this should already occur since the Google bot is not on the approved list of bots. (Make sure you are using the updated auction.php file that does user agent, referrer, and IP checks to try and ban bad bots and clicks from undesirable countries.)</p>
<p>But just to make sure, add this code within the top section of auction.php where a user agent check is being made:</p>
<p>if (preg_match(&#8221;/google/&#8221;,$current_user_agent)) {<br />
$ua_approved = false;<br />
}</p>
<p>This checks if the user agent has Google in it.  If so, set this to be a banned bot.  You can test this using the User Agent Switcher plugin for Firefox, which lets you fake your user agent so your website thinks you are a Google bot.</p>
<p>You can also ad Google IP addresses within the ban list to ban by IP.  While this can &#8216;mostly&#8217; be effective, just give up on the idea that you will get a list of all of Google&#8217;s IP addresses.</p>
<p>My belief is that Google has a set IP list, but also adds some other / random IP every so often, with a masked user agent, to try and catch cloakers.</p>
<p><strong>14. Replace the Graveyard for Undesirable Clicks</strong></p>
<p>By default if a bad bot or IP address is clicking a link to eBay, auction.php will instead show them a blank html page.</p>
<p>You can better.  You could send someone clicking from China to an affiliate offer, Adsense page, or anywhere else.  Or your home page.</p>
<p>To do that replace the html with this php redirect to the home page:</p>
<p>header(&#8217;Location: /&#8217;);</p>
<p>Some will say it is better coding to have the url fully listed instead of a backslash, such as hxxp://yahoo.com, but using a backslash seems to work for me &#8211; and works better if your auction.php file is being shared by various domains.</p>
<p><strong>15. Don&#8217;t Use the Same Customizations</strong></p>
<p>When doing the above customizing be sure not use the same custom keyword.  For instance, use keyword 1 to begin product urls and keyword 2 to begin image urls.</p>
<p><strong>16. Avoid Repetitive Use of eBay Product IDs</strong></p>
<p>Each eBay product phpBay lists will show it&#8217;s product ID in the image url and product url.  And also possibly elsewhere, if you decide to use it as an alt image tag.</p>
<p>I&#8217;ve decided to remove my alt image tags since I am not trying to get the eBay images indexed.</p>
<p>To prevent the image url from having the same text as the product url, make these changes to the image url so it is different:</p>
<p>- Add text immediately before the product ID.  For example, in ebay.php use this for your introductory image text:</p>
<p>var $image_replace = &#8220;ban/keyword/extratext&#8221;;</p>
<p>We are adding &#8216;extratext&#8217; here to what is listed above.  &#8220;extratext&#8221; can be another keyword or random text.  It&#8217;s purpose is to differentiate the beginning of the image url.</p>
<p>- After removing the image footprint discussed previously, add this to your ebay.php file:</p>
<p>$this-&gt;image = preg_replace(&#8217;/0/&#8217;, &#8216;Z&#8217;, $this-&gt;image, 1);</p>
<p>What this will do is replace the first zero in the image product url to the letter Z.  This will make the image urls different from the product urls, and randomly so since the first number zero in the product IDs occurs in different places.  For now, it is always somewhere, though, in eBay&#8217;s product code.</p>
<p>- Now you need to fix your htaccess so that you can still retrieve the proper image even though the url has changed on your website.  Use this, which combines the customizations in this section:</p>
<p>RewriteRule ^ban/keyword/extratext([^Z]*)Z(.*)-custom.(.*) http://thumbs.ebaystatic.com/pict/$1\0$2 [N]</p>
<p>Test to make sure it works.  This is really slick!  Now you have completely unique image urls, and there is no repetitive use of eBay product IDs that match the link to the eBay product.</p>
<p><strong>17. Eliminate eBay Product ID from Product Links</strong></p>
<p>Just as we changed the product ID in the image url we can make a change to product url.  Why?  So every link does not have underscore 12 digit number underscore.  Big surprise, the 12 digit ID is an eBay id.</p>
<p>To eliminate this footprint, in ebay.php file add custom text immediately before the product ID.  Building off the example above where we eliminated the ending &#8216;_US&#8217; footprint, we now have:</p>
<p>$this-&gt;link_url = $this-&gt;site_url . $this-&gt;url_prefix . $this-&gt;urlText($item['title']) . &#8220;_CUSTOM1&#8243; . $this-&gt;item_id . &#8220;_CUSTOM2&#8243; . $this-&gt;eb_custom_cid . &#8220;.html&#8221;;</p>
<p>and our .htaccess link code is now:</p>
<p>RewriteRule ^ban/keyword-(.*)_CUSTOM1(.*)_(.*)_(.*).html$ auction.php?title=$1&amp;item=$2&amp;country=US&amp;ccid=$4<br />
RewriteRule ^ban/keyword-(.*)_CUSTOM1(.*)_(.*).html$ auction.php?title=$1&amp;item=$2&amp;country=US<br />
RewriteRule ^ban/keyword-(.*)_CUSTOM1(.*).html$ auction.php?title=$1&amp;item=$2</p>
<p>So if our custom text is FF, instead of seeing _123456789012_ Google will now see a unique code of _FF123456789012_.</p>
<p>Since you can have your own unique custom text, with its own length, another footprint is eliminated.</p>
<p><strong>18. Eliminate the Product Title from Product ID Link</strong></p>
<p>In my sites I am not linking the product title to eBay.  Just the product image and letting the product title simply be text.</p>
<p>I was looking at the auction.php file and saw that the product title does not appear to be passed to eBay.</p>
<p>(I also don&#8217;t see where it is being used by QCT, although the variable is passed to the script.)</p>
<p>Removing the item title from the link url in ebay.php, and associated change in .htaccess does not seem to have any negative impact.</p>
<p>I believe the item title in the link url is only there for the &#8220;SEO Urls&#8221; option.</p>
<p>But there are really two SEO issues here:</p>
<p>1. Showing a naked link to eBay versus a link that appears to be on my site.  In other words, obfuscating that this is an affiliate site.</p>
<p>2. Using keywords in link urls.  But there is no purpose in creating an SEO link to eBay because we do not want to promote eBay listings ahead of our listings of eBay listings.  And since the link is to a nonexistent page on our site there is no page for Google to index.  So there may be no SEO benefit except from having the keywords listed on the page twice, in addition to the listing for the product title.</p>
<p>Removing the item title from the link url does not affect SEO issue #1.</p>
<p>For issue #2 it depends on your SEO beliefs.  Is there a benefit from having the product title mentioned twice (once in the link and one for the product title)?  Or avoid repetition and a footprint by only having it once as the product title?</p>
<p>Here is how do to it:</p>
<p>New line in ebay.php, incorporating the above customizations:</p>
<p>$this-&gt;link_url = $this-&gt;site_url . $this-&gt;url_prefix . &#8220;_CUSTOM1&#8243; . $this-&gt;item_id . &#8220;_CUSTOM2&#8243; . $this-&gt;eb_custom_cid . &#8220;.html&#8221;;</p>
<p>Change the htaccess, so with all of the above it is this for the product links:</p>
<p>RewriteRule ^ban/keyword-(.*)_CUSTOM1(.*)_(.*)_(.*).html$ auction.php?item=$1&amp;country=US&amp;ccid=$3<br />
RewriteRule ^ban/keyword-(.*)_CUSTOM1(.*)_(.*).html$ auction.php?item=$1&amp;country=US<br />
RewriteRule ^ban/keyword-(.*)_CUSTOM1(.*).html$ auction.php?item=$1</p>
<p><strong>Conclusion: Wrapping up all of the above here are the phpbay script changes</strong></p>
<p>(note: if copying from this page remember to fix your quotes and single quotes to normal keyboard characters)</p>
<p><em>config.php</em></p>
<p>$config['url_prefix'] = &#8220;ban/keyword1-&#8221;;</p>
<p># MAXIMUM ITEMS PER PAGE<br />
$randomnum = mt_rand (5,15);<br />
$config['paging_num'] = $randomnum;</p>
<p><em>ebay.php</em></p>
<p>var $image_replace = &#8220;ban/keyword2/extratext&#8221;;</p>
<p>$this-&gt;link_url = $this-&gt;site_url . $this-&gt;url_prefix . &#8220;_CUSTOM1&#8243; . $this-&gt;item_id . &#8220;_CUSTOM2&#8243; . $this-&gt;eb_custom_cid . &#8220;.html&#8221;;</p>
<p>under the setup the RSS class section is this code:</p>
<p># if mod_rewrite for images is enabled, rewrite the url<br />
if ($this-&gt;mod_rewrite == &#8220;1&#8243;) {<br />
$this-&gt;image = str_replace($this-&gt;image_find, $this-&gt;image_replace, $this-&gt;image);<br />
}</p>
<p>Immediately after that code add the following code</p>
<p>$footprint = &#8220;.jpg&#8221;;<br />
$footprintreplace = &#8220;-xxx.jpg&#8221;;<br />
$this-&gt;image = str_replace($footprint, $footprintreplace, $this-&gt;image);<br />
$this-&gt;image = preg_replace(&#8217;/0/&#8217;, &#8216;Z&#8217;, $this-&gt;image, 1);</p>
<p><em>.htaccess</em></p>
<p>RewriteRule ^ban/keyword2/extratext([^Z]*)Z(.*)-xxx.(.*) http://thumbs.ebaystatic.com/pict/$1\0$2 [N]<br />
RewriteRule ^ban/keyword1-(.*)_CUSTOM1(.*)_(.*)_(.*).html$ auction.php?item=$1&amp;country=US&amp;ccid=$3<br />
RewriteRule ^ban/keyword1-(.*)_CUSTOM1(.*)_(.*).html$ auction.php?item=$1&amp;country=US<br />
RewriteRule ^ban/keyword1-(.*)_CUSTOM1(.*).html$ auction.php?item=$1</p>
<p><em>template</em></p>
<p>- customize statement under forms when no results are found<br />
- customize look of results that displayed</p>
<p><em>auction.php</em></p>
<p>Within the top section where a user agent check is being made:</p>
<p>if (preg_match(&#8221;/google/&#8221;,$current_user_agent)) {<br />
$ua_approved = false;<br />
}</p>
<p>replace the html with this php redirect to the home page:</p>
<p>header(&#8217;Location: /&#8217;);</p>
<p><em>robots.txt</em></p>
<p>User-agent: *<br />
Disallow: /ban/</p>
<p>There you have it,  easy ways to change your <a href="http://internetprofituniversity.com/recommends/phpbay.php">PHPBay</a> footprint so you don&#8217;t automatically scream to Google &#8211; hey, eBay affiliate site here.  There are already enough stories of how Google hates eBay affiliate sites without adding yours to the collection.</p>
<p>Related Post:</p>
<p><a href="http://internetprofituniversity.com/blog/how-to-create-links-google-cannot-follow/">How to Hide your eBay affiliate links from Google</a></p>
<p>Update: This comes from the phpBay forum, but I wanted to include it because it is so useful (just in case something ever happened to that forum post).  This is how to use Skimlinks with phpBay:</p>
<p>You can use SkimLinks with the current PhpBay version with just a little modification to your auction.php file.</p>
<p>   1. Go to https://accounts.skimlinks.com/sites to get the Publisher ID of your website.<br />
   2. You need to use the SEO Urls feature for this to work.<br />
   3. Add the following code after the long line that starts with $url = &#8220;http://rover.ebay.com/rover/&#8230;.&#8221; in auction.php (near line 279 at the end):<br />
      Code:</p>
<p>      //SkimLinks Mod Start<br />
      $SkimPubID = &#8220;12345&#215;123456&#8243;;<br />
      $url = &#8220;http://go.redirectingat.com?id=&#8221;.$SkimPubID.&#8221;&#038;xs=1&#038;url=http%3A%2F%2F&#8221;.$rover['url'].&#8221;%2F&#8221;.$ktv['item'].&#8221;%2F&#8221;;<br />
      $ktv["pid"] = 1;<br />
      //SkimLinks Mod End</p>
<p>   4. Replace the 12345&#215;123456 with your Publisher ID that you got in step 1<br />
   5. The $ktv["pid"] is optional, it&#8217;s the eBay CampaignID so you can track all SkimLinks clicks in QCT under campaign 1</p>
]]></content:encoded>
			<wfw:commentRss>http://internetprofituniversity.com/blog/how-to-customize-phpbay/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHPBay and WordPress Subdomains</title>
		<link>http://internetprofituniversity.com/blog/phpbay-and-wordpress-subdomains/</link>
		<comments>http://internetprofituniversity.com/blog/phpbay-and-wordpress-subdomains/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 02:05:30 +0000</pubDate>
		<dc:creator>Brian Kindsvater</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[PHPBay]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://internetprofituniversity.com/blog/?p=121</guid>
		<description><![CDATA[Does PHPBay Pro work with the WordPress subdomains plugin so that pages can be created as subdomains and eBay auction listings will properly work on the subdomains?
Yep.  Works like a charm.
]]></description>
			<content:encoded><![CDATA[<p>Does <a href="http://internetprofituniversity.com/recommends/phpbay.php">PHPBay Pro</a> work with the WordPress subdomains plugin so that pages can be created as subdomains and eBay auction listings will properly work on the subdomains?</p>
<p>Yep.  Works like a charm.</p>
]]></content:encoded>
			<wfw:commentRss>http://internetprofituniversity.com/blog/phpbay-and-wordpress-subdomains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.htaccess Wars &#8211; How to Ban Idiots from Your Website</title>
		<link>http://internetprofituniversity.com/blog/htaccess-wars-how-to-ban-idiots-from-your-website/</link>
		<comments>http://internetprofituniversity.com/blog/htaccess-wars-how-to-ban-idiots-from-your-website/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 02:01:18 +0000</pubDate>
		<dc:creator>Brian Kindsvater</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://internetprofituniversity.com/blog/?p=51</guid>
		<description><![CDATA[Sometimes you want to ban someone from your website.  To ban someone from accessing your website you need to know their IP address.   You can get their address from your server logs or emails.
If you ban someone, though, they&#8217;ll know it, because they will receive a server code informing them access is denied to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to ban someone from your website.  To ban someone from accessing your website you need to know their IP address.   You can get their address from your server logs or emails.</p>
<p>If you ban someone, though, they&#8217;ll know it, because they will receive a server code informing them access is denied to your site.</p>
<p>Much better than an outright ban is fooling them into believing they are seeing a real page on your website, when in fact they are the only one seeing that page.   Everyone else in the world gets to see your website, but they get to see a fake page, or anything you want, and they&#8217;ll never know!</p>
<p>Here is the code you need for your .htaccess file to redirect two IP addresses to a new page whenever they try to access any page on your website:</p>
<p>RewriteEngine On<br />
RewriteBase /<br />
RewriteCond %{REMOTE_HOST} 10\.20\.30\.40 [or]<br />
RewriteCond %{REMOTE_HOST} 11\.22\.33\.44<br />
RewriteRule .* http://yourdomain.com/fakepage.html [R=301,L]</p>
<p>Just replace the two sample IP addresses (10.20.30.40 and 11.22.33.44) with the IP addresses you want to ban.  I included two addresses so you can see how the code works when there is more than one address, using the [or] command.  This can be used over and over for more IP addresses.</p>
<p>Some amateur php programmers, like Robert Plank, do this all wrong, and make it obvious someone is banned from a website.  Making it obvious is not only bush, but a complete waste of time and ineffectual since it will take someone about 30 seconds to sign on through a proxy service to avoid an IP ban.</p>
<p>That is why you need a fake page.   One trick is to send the person to page that mimics what is displayed when there is a server error code.  Then, the idiot you want to ban thinks you&#8217;re out of service, when in fact they&#8217;re the one out in the cold.</p>
]]></content:encoded>
			<wfw:commentRss>http://internetprofituniversity.com/blog/htaccess-wars-how-to-ban-idiots-from-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

