<?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>DesignerTuts &#187; PHP</title>
	<atom:link href="http://designertuts.com/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://designertuts.com</link>
	<description>Photoshop Tutorials</description>
	<lastBuildDate>Tue, 12 Jan 2010 16:37:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to Hide Affiliate Links</title>
		<link>http://designertuts.com/how-to-hide-affiliate-links/</link>
		<comments>http://designertuts.com/how-to-hide-affiliate-links/#comments</comments>
		<pubDate>Mon, 25 May 2009 13:48:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://designertuts.com/?p=527</guid>
		<description><![CDATA[How to Beat the Hackers
There are many schemes out there to stop people changing your links but in my opinion there is only one worth considering &#8211; the &#8220;htaccess technique&#8221;. It does require a certain level of technical expertise to set up but its not that difficult and this tutorial will take you through the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to Beat the Hackers</strong></p>
<p>There are many schemes out there to stop people changing your links but in my opinion there is only one worth considering &#8211; the &#8220;htaccess technique&#8221;. It does require a certain level of technical expertise to set up but its not that difficult and this tutorial will take you through the steps needed.<br />
<span id="more-527"></span></p>
<p>A popular way to make money is by use of <strong>affiliate links</strong>. This is where you advertise a product on your website and the product owner pays you a percentage of the purchase price when the person who follows the link subsequently buys the product or service.</p>
<p>For example a (fictitious) company Brilliant Books sells books at www.brillbooks.com and has an affiliate scheme where they pay 10% to you for every person you send to them who buys one of their books. They do this by getting you to register as an affiliate and give you a unique affiliate id code of 1234. </p>
<p>They know it&#8217;s you who sent the potential buyer to them because you link to www.brillbooks.com?affid=1234 instead of to www.brillbooks.com</p>
<p>Some people write malicious programs that they install on computers without the owners knowledge that will for example alter your link to brillbooks so that it says www.brillbooks.com?affid=6666 Now when the potential buyer clicks on the link the 10% affiliate fee goes to someone else.</p>
<p>So how do you stop this?</p>
<p><strong>1. Find out if your web host is suitable.<br />
</strong><br />
This method only works for web servers that use Apache (as far as I know). Go to <a href="http://www.netcraft.com/whats">www.netcraft.com/whats</a> and type in your website address into the &#8220;whats that site running&#8221; box. Then look under the &#8220;server&#8221; column and look for the word &#8220;Apache&#8221;. If its there then this method will work.</p>
<p><strong>2. What is htaccess. Where is it located.<br />
</strong><br />
htaccess is a configuration file that contains instructions for the web server. You may already have one ( or more than one as they can work on a per directory basis). To find out fire up your ftp program or file browser or whatever you normally use to upload your website to your webserver and have a look.</p>
<p>htaccess is stored as a hidden file on the webserver which means its filename will be .htaccess<br />
Your ftp program may by default not show you hidden files so you may need to enable viewing hidden files to be able to see .htaccess<br />
Look for .htaccess in the same folder as your website&#8217;s index file. (index.html, index.htm, index.php or similar)</p>
<p>If you find one then you can edit it using any editor that is suitable for text files. Watch out on Windows systems that it doesn&#8217;t try to change the name to something more Windows friendly. This is because a file named .htaccess is alien to Windows. Usually putting quotes round the name when you do Save As will solve any problems i.e. save as &#8220;.htaccess&#8221;</p>
<p>If you don&#8217;t find an existing one then create a new one.</p>
<p><strong>3. What changes do I need to make to .htaccess<br />
</strong><br />
Here is an example of the changes you need to make. Just add all the following at the top of your .htaccess file. Don&#8217;t touch anything that&#8217;s there already.</p>
<p>&lt;ifmodule mod_rewrite.c&gt;<br />
RewriteEngine On</p>
<p>RewriteRule anyfilename.htm http://myaffid.blueberryc.hop.clickbank.net/?tid=LOGO1 [R=301,L]</p>
<p>&lt;/ifmodule&gt;</p>
<p><strong>4. Now change example code to real code<br />
</strong><br />
Where I have anyfilename.htm you should put a filename appropriate to your situation. e.g. if you were linking to a book website and a book about rare birds you might put rarebirds.htm This filename can be anything you want as long as it DOESN&#8217;T already exist.</p>
<p>Where I have put http://myaffid.blueberryc.hop.clickbank.net/?tid=BIRDS1 you should put your real affiliate id link as provided by your affiliate website.</p>
<p>Leave the [R=301,L] alone. It tells the webserver to redirect any requests for rarebirds.htm to http://myaffid.blueberryc.hop.clickbank.net/?tid=BIRDS1</p>
<p><strong>5. And finally<br />
</strong><br />
Edit your webpage and put your new cloaked website affilate link in place of the existing link.</p>
<p>For example you might have the following html:</p>
<p><code>&lt;p&gt;The people at Brill Books have some good books about &lt;a href="http://myaffid.blueberryc.hop.clickbank.net/?tid=BIRDS1"&gt;Rare Birds&lt;/a&gt;.&lt;/p&gt;<br />
</code><br />
You should change it to</p>
<p><code>&lt;p&gt;The people at Brill Books have some good books about &lt;a href="rarebirds.htm"&gt;Rare Birds&lt;/a&gt;.&lt;/p&gt;<br />
</code><br />
It no longer looks like an affiliate link but it is. Make sure you check it is working properly of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://designertuts.com/how-to-hide-affiliate-links/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Protecting sensitive personal data with encryption</title>
		<link>http://designertuts.com/protecting-sensitive-personal-data-with-encryption/</link>
		<comments>http://designertuts.com/protecting-sensitive-personal-data-with-encryption/#comments</comments>
		<pubDate>Fri, 07 Dec 2007 13:06:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://designertuts.com/protecting-sensitive-personal-data-with-encryption/</guid>
		<description><![CDATA[It is a common situation to want to store data about a person in a database. For example their name, address, phone number etc. In many countries it is illegal to store this data without some form of protection but even without such a law it is common courtesy to look after this data to [...]]]></description>
			<content:encoded><![CDATA[<p>It is a common situation to want to store data about a person in a database. For example their name, address, phone number etc. In many countries it is illegal to store this data without some form of protection but even without such a law it is common courtesy to look after this data to the best of your ability. You don&#8217;t know how well your hosting company looks after this data so why take the risk. This data should be encrypted.</p>
<p>This tutorial will show you a simple example of a user registration system. It hasn&#8217;t been designed as a class you can plug in to your application. Instead it is a tutorial to show you how to use the mcrypt functions within your application.</p>
<p>This is not a complete solution to your security worries! You will almost certainly need to consider other factors to build a secure application but this is a good start. So if your hosting company (or government department!) puts your database on a couple of cds and puts them in the post (mail) you can sleep better at night knowing your data is safe.</p>
<p><span id="more-181"></span></p>
<p>The demo system asks users for 2 pieces of data:</p>
<p>a username<br />
and a real name</p>
<p>This data is then stored in a mySQL database. The username is stored as it is entered and the real name is stored encrypted.</p>
<p>The encryption key is stored in a file. Without it, it is not possible to determine the users real name.</p>
<p>The encryption is based on the mcrypt library which supports a wide variety of algorithms and modes of operation. I have chosen to use BLOWFISH in CBC mode.</p>
<p>The first thing to check before using this code is that your hosting has mcrypt available. The easiest way is to look in your phpinfo output and search for mcrypt. The other way is to try the demo and if it reports errors then you probably don&#8217;t have it!</p>
<h2>Configuration File</h2>
<p>It is best to create a config file that contains access details for your database and your secret encryption key. Make the key equal to 56 characters of random data. Don&#8217;t just change the odd character from what is below. Generate your own unique key. You can find many guides to creating random strings. There is a good one <a href="https://www.grc.com/passwords.htm">here </a><br />
<code></code></p>
<p>Also change the table name (demousers) to match your database table.</p>
<p>Save the following as config.php and upload it to your webserver. Locate it so that it is not accessible to web users if possible.<br />
<code><br />
&lt;?php<br />
define("DB_SERVER", "localhost");<br />
define("DB_NAME", "databasename");<br />
define ("DB_USER", "databaseuser");<br />
define ("DB_PASSWORD", "password");<br />
define ("THE_KEY", "thwkdyetrabdlp963gdmnsb49dhsrqi785hfipl;aw3467fbdjs713ga");<br />
define("USER_TABLE", DB_NAME.".demousers");<br />
?&gt;</code></p>
<h2>Database Table</h2>
<p>Here is a typical database table that works with the tutorial.<br />
<code><br />
CREATE TABLE `demousers` (<br />
`id` int(11) NOT NULL auto_increment,<br />
`username` varchar(25) NOT NULL default '',<br />
`realname` varchar(32) NOT NULL default '',<br />
PRIMARY KEY  (`id`)<br />
) TYPE=InnoDB AUTO_INCREMENT=2 ;<br />
</code></p>
<h2>The Code</h2>
<p>Follow the link to view the code.  Any questions post a comment.</p>
<p><a href="http://designertuts.com/wp-content/uploads/2007/12/protect.txt" title="Mcrypt protection demo">Mcrypt protection demo</a></p>
<p>You can see the the demo in action <a href="http://merseysidetoday.co.uk/encryption.php">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://designertuts.com/protecting-sensitive-personal-data-with-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>htaccess: Stopping &#8220;page not found&#8221; errors</title>
		<link>http://designertuts.com/htaccess-stopping-page-not-found-errors/</link>
		<comments>http://designertuts.com/htaccess-stopping-page-not-found-errors/#comments</comments>
		<pubDate>Sun, 18 Nov 2007 21:27:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://designertuts.com/htaccess-stopping-page-not-found-errors/</guid>
		<description><![CDATA[Stop Page not found errors when you restructure or move your site
Its a problem I come across often. Someone does a complete site redesign and all the filenames and paths have changed. They are really pleased with their new site. It looks good and works well. But what they don&#8217;t realise is their users aren&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<h3>Stop Page not found errors when you restructure or move your site</h3>
<p>Its a problem I come across often. Someone does a complete site redesign and all the filenames and paths have changed. They are really pleased with their new site. It looks good and works well. But what they don&#8217;t realise is their users aren&#8217;t so happy. Why? Well perhaps they have bookmarked one of your old pages. Or perhaps they type a search phrase into a search engine and it returns a link to your old pages. In both cases they will get &#8220;Page not found&#8221;.</p>
<p><span id="more-178"></span></p>
<h3>301 Redirect</h3>
<p>The solution to these problems is the &#8220;301 Redirect&#8221; and isn&#8217;t hard to do if your web hosting uses Apache which is a common situation. Unlike some other solutions to this problem, this method is also search engine friendly.</p>
<p>The method I will be explaining is how to redirect using .htaccess.</p>
<h3>What is .htaccess</h3>
<p>Its just a simple text file with an unusual name. Most file names you will be used to are like this: name.txt<br />
There is a part before the dot and a part after which is known as the file extension.<br />
With .htaccess there is nothing before the dot.</p>
<h2>Making .htaccess</h2>
<p>You can create .htaccess the same way you create any text file. All you need to be careful of is that after you have created it you need to check it REALLY is named .htaccess Some file editors will try and &#8220;help out&#8221; by appending .txt to the file name for example</p>
<p>I will explain some of the most common types of redirect you will want to do, but all of them will use the following as a basic .htaccess file so to start with put the following in your .htaccess file</p>
<p><code><br />
&lt;IfModule mod_rewrite.c&gt;</code></p>
<p>RewriteEngine On<br />
RewriteBase /</p>
<p>&lt;/IfModule&gt;<br />
This just checks that your webserver is configured correctly to allow .htaccess to work, switches the redirect feature on and tells it to work from the top level of your website. Add the commands given later in this tutorial after the RewriteBase / command.</p>
<p>I will now give some examples of typical situations in which you would use .htaccess. Choose the one that best solves your problem and add the  commands shown to your .htaccess file</p>
<h3>Simple Redirect to home page</h3>
<p>The most basic redirect is for the situation where you don&#8217;t really have a specific page in mind. You just want them to go to your home page. Use this as a minimum, it will stop people getting page not found and is a useful stopgap solution while you wait for the search engines to catch up with your new website structure.</p>
<p>For example you may have previously had a load of webpages in a folder called htmlpages  and the folder isn&#8217;t there anymore. Add the following and any requests for pages like http://site.com/htmlpages/index.php will be redirected to http://site.com/</p>
<p><code>RewriteRule ^htmlpages/(.*) http://site.com/ [R=301,L]</code></p>
<p>Just to explain what this means&#8230;<br />
The ^ indicates start of line<br />
(.*) means any combination of characters<br />
so this rewrite rule will apply to any url that starts with htmlpages/ and is followed by absolutely anything<br />
The [R=301,L] says &#8220;Do a 301 redirect&#8221; and &#8220;this is the last rule&#8221;.</p>
<p>So for your site just put whatever you want to &#8220;redirect from&#8221; after the ^ and replace &#8220;http://site.com/&#8221; with where you want to redirect to.</p>
<p>i.e.<br />
<code>RewriteRule ^&lt;old page&gt; http://newsite.com [R=301,L]</code></p>
<p>&lt;old page&gt; needs to be specified as a regular expression. If you don&#8217;t know what a regular expression is just type regex into a search engine to find many sites that will explain in more detail.</p>
<h3>Redirect because of a renamed directory</h3>
<p>In this case use the following</p>
<p><code>RewriteRule ^old_directory/(.*) new_directory/$1 [R=301,L]</code></p>
<p>This is very similar to before but in this case instead of dumping everything to the home page we are now going to be more precise.</p>
<p>The key here is the use of the $1 at the end of the new_directory. This tells it to replace the $1 with whatever was in the first regular expression group. In our case the (.*) so a rule like this</p>
<p><code>RewriteRule ^htmlpages/(.*) http://www.merseysidetoday.co.uk/code/$1 [R=301,L]</code></p>
<p>would cause a url of http://www.merseysidetoday.co.uk/htmlpages/index.php to be rewritten to http://www.merseysidetoday.co.uk/code/index.php</p>
<h3>Redirect because you have renamed .html files to .php</h3>
<p>You may have a website with static html pages that you want to change to have dynamic content. This will mean a rename to have the .php extension. To stop the dreaded &#8220;page not found&#8221; you can redirect all .html to be .php</p>
<p><code>RewriteRule ^(.*)\.html$ $1.php [R=301,L]</code></p>
<p>this means redirect &lt;anything&gt;.html to &lt;anything&gt;.php</p>
<h3>Redirecting web pages with query strings</h3>
<p>If your url has a query string in it you can&#8217;t match it using just a RewriteRule command. You must use RewriteCond.<br />
The RewriteCond command goes on the line before RewriteRule as shown below.</p>
<p>I recently wanted to redirect wordpress blog pages to corresponding VBulletin blog articles. Not a very common situation I suppose but it provides a good example of how to redirect pages that contain query strings. e.g. http://www.designertuts.com/blog/?p=8  (p=8 is the query string)</p>
<p>To redirect http://designertuts.com/blog/?p=8 to http://designertuts.com/forum/blog.php?b=15 use the following command (due to its length the RewriteRule has split onto 2 lines but you should type it on a single line)</p>
<p><code>RewriteCond %{QUERY_STRING} ^p=8$<br />
RewriteRule ^blog/$ http://designertuts.com/forum/blog.php?b=15 [R=301,L]</code></p>
<p>The RewriteCond line says apply the following RewriteRule if the url ends with the query string ?p=8<br />
The RewriteRule says rewrite urls ending with blog/ (and we know from the RewriteCond that they will also have ?p=8) to http://designertuts.com/forum/blog.php?b=15</p>
<h3>Upload .htaccess</h3>
<p>Now we need to upload it to our webserver. Before you do upload it make sure there isn&#8217;t an existing htaccess file there already. If there is you will need to look at what&#8217;s in it and see if it&#8217;s possible to merge together the existing commands with what you are trying to do. If all is well just use your favourite ftp program as usual making sure it is uploaded in ascii not binary mode.<br />
You can place it wherever you want. Its effects will be felt in the folder it is placed in and in any subfolders.</p>
<h3>Notes</h3>
<p>Use of .htaccess is only appropriate when you DON&#8217;T have control over your webserver&#8217;s configuration. If you are the administrator then it is better to put commands in your httpd.conf file as this will lead to faster processing of the commands.</p>
<p>Make sure your hosting allows htaccess files. Ones that do may still restrict what you are allowed to do with them.</p>
<p>Watch out for .htaccess files in other directories as they may conflict with each other.</p>
<p>A good summary can be found here<br />
<a href="http://www.addedbytes.com/apache/mod_rewrite-cheat-sheet/">http://www.addedbytes.com/apache/mod_rewrite-cheat-sheet/</a><br />
Any problems leave me a comment.</p>
<p>Mike</p>
]]></content:encoded>
			<wfw:commentRss>http://designertuts.com/htaccess-stopping-page-not-found-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Paypal IPN: receiving instant payments in your web application.</title>
		<link>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/</link>
		<comments>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 14:04:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Paypal and Paypal IPN]]></category>

		<guid isPermaLink="false">http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/</guid>
		<description><![CDATA[
This paypal ipn tutorial explains how to use Paypals IPN system with a simple single item purchase. Instant Payment Notification allows you to integrate your PayPal payments with your website&#8217;s back-end operations, so you get immediate notification and authentication of the PayPal payments you receive. The main use of IPN is where your website needs [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.shareasale.com/r.cfm?b=16357&amp;u=344862&amp;m=3826&amp;urllink=&amp;afftrack="><img src="http://www.shareasale.com/image/lokpaypal.gif"   border="0" /></a></p>
<p>This<strong> paypal ipn tutorial</strong> explains how to use Paypals IPN system with a simple single item purchase. Instant Payment Notification allows you to integrate your PayPal payments with your website&#8217;s back-end operations, so you get immediate notification and authentication of the PayPal payments you receive. The main use of IPN is where your website needs to know immediately that payment has been made. For example you might have sold something that you will then make available for the user to download.</p>
<p>There is a lot of information on the Paypal website which is worth looking at but the following <strong>paypal ipn example</strong> will show you in detail a real world example of how to use it.</p>
<p><span id="more-145"></span></p>
<p>There are 3 main parts to an IPN system.</p>
<p>1) A webpage that initiates a call to Paypal to make a payment<br />
2) A php page on your webserver that Paypal calls to notify you that payment has been made<br />
3) A webpage that confirms the above have occurred, and continues on to the next phase of you web application.</p>
<p>1 and 3 will be part of your website and accessible to users in the normal way. 2 however is only ever accessed by paypal.</p>
<p>I will first explain some of the issues that you need to understand if you want to know <strong>how to use IPN</strong>.</p>
<h2>Paypal Account Setup</h2>
<p>Your Paypal account must be setup correctly to use IPN. Check the following in your paypal account (under edit profile).</p>
<p>under &#8220;Selling Preferences&#8221; , &#8220;Instant Payment Notification Preferences&#8221;</p>
<ul>
<li>set IPN to &#8220;On&#8221;</li>
<li>set IPN Url to the page containing the ipn code shown later in the tutorial. The name I use is &#8220;http://&lt;yourwebsite address&gt;/paypalipn.php&#8221; but you can use anything here.</li>
</ul>
<p>Under &#8220;Selling Preferences&#8221;, &#8220;payment receiving preferences&#8221;</p>
<ul>
<li>block payments from users who pay with echeck. (This is because these will not be instant)</li>
</ul>
<p>Under &#8220;account information&#8221; , &#8220;email&#8221;</p>
<ul>
<li>make a note of your primary email address. You will need to embed it in the code below. This email will be visible to users so make it a professional one. Users don&#8217;t get a good feeling about sending money to a hotmail address or to an address that doesnt match the website.</li>
</ul>
<h2>Sequence of Events</h2>
<p>The way IPN works is a bit unusual so to explain&#8230;</p>
<p>You initiate IPN by sending a message to Paypal from the webpage that the user is on when they confirm a purchase.<br />
What happens next is that 2 completely separate chains of events occur.</p>
<ul>
<li>The first is the obvious one where the user goes to the paypal website, makes the payment and is returned to your website where they can be told their purchase is confirmed.</li>
<li>The second is initiated by Paypal and envolves Paypal calling up a predetermined webpage on your site (paypalipn.php). Paypal will send a message to this page which indicates that the payment has happened, how much was paid, who paid it, who was paid etc. On this page you need to check these details and somehow log that the payment has happened, usually by updating a database.</li>
</ul>
<p>These two chains of events are happening at the same time (only the first is visible to the user). Although as the paypal event is more complex it will usually take longer. For this reason when you send the user to the confirmation page and it checks the database that payment has happened ok it may well find that the payment hasn&#8217;t yet been made. You will need to create some code that waits for the payment to go through and as this can take quite a few seconds you will need to inform the user with a message along the lines of &#8220;Waiting for Paypal to confirm payment&#8230;&#8221;.</p>
<p>So in summary</p>
<ol>
<li>Customer makes a payment through your website.</li>
<li>Paypal sends an IPN to your specified ipn webpage specifying what has been bought etc</li>
<li>Your webpage validates the IPN and sends Paypal an acknowledgement.</li>
<li>Customer continues to access your website.</li>
</ol>
<p>2 and 3 occur in parallel with what the user is doing in 4) on your website.</p>
<h2>The purchase page</h2>
<p>The easiest way to generate the code to use on this page is to use Paypals &#8220;Buy Now Button&#8221; function. Log in to Paypal and look under Merchant Services for &#8220;Buy It Now&#8221; button.</p>
<p>Fill in the information as required</p>
<p>You must take steps to ensure the security of the purchase.<br />
There are various ways of doing this</p>
<ul>
<li>Encrypt the button on the paypal site (there is an option for this)</li>
<li>Encrypt the button yourself (complex and beyond this tutorial)</li>
<li>Manually check all prices before shipping. I assume this isn&#8217;t appropriate for this tutorial.</li>
<li>Check all the values in the IPN processing. (Explained below in the paypalipn.php code)</li>
</ul>
<p>If you enter an image for the button make sure it is on a secure (https) server otherwise the user will get a warning about insecure items which may scare them off continuing with the purchase.</p>
<p>Click to &#8220;Create Button&#8221; and copy and paste the code produced into your purchase web page.</p>
<p>The code will look something like this&#8230;</p>
<p><a href="http://designertuts.com/wp-content/uploads/2007/10/but-code" title="button code">button code</a></p>
<h2>The IPN webpage code</h2>
<p><a href="http://designertuts.com/wp-content/uploads/2007/10/paypalipnphp.txt" title="Paypal IPN page">Paypal IPN page</a><br />
Save this as paypalipn.php</p>
<h2>Notes</h2>
<p>There are two methods of validating the IPN sent by Paypal. Shared Secret and Postback. Paypal recommends shared secret as it is more secure but this tutorial uses Postback. Shared Secret requires that you have dedicated hosting, SSL enabled and you use Paypal Encypted website payments. Paypal recommends Postback for shared hosting applications and where you dont have SSL.<br />
They also don&#8217;t recommend you use IPN unless you have SSL !</p>
<h2>This is too complicated!</h2>
<p>Hope you enjoyed the tutorial. IPN is a complicated subject. If you found it too complicated there are a few commercial products out there that will handle everything for you, such as (this is an affiliate link so I am paid for this recommendation)</p>
<ul>
<li> <a href="vibralogix.htm">Vibralogix Linklok Paypal</a></li>
</ul>
<p>Here are some useful websites to help you.</p>
<p><a href="https://www.paypal.com/IntegrationCenter/ic_ipn.html">Overview</a></p>
<p><a href="https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&#038;content_ID=developer/e_howto_html_IPNandPDTVariables">IPN Variables</a></p>
<p><a href="https://www.paypal.com/en_US/pdf/PP_OrderManagement_IntegrationGuide.pdf">Order Management Guide</a></p>
<p><a href="http://paypaltech.com/SG2/">Script Generator</a></p>
<p><a href="http://www.pdncommunity.com/pdn/board?board.id=ipn">Forum</a></p>
<p><a target="_blank" href="http://www.shareasale.com/r.cfm?b=16357&amp;u=344862&amp;m=3826&amp;urllink=&amp;afftrack="><img src="http://www.shareasale.com/image/lokpaypal.gif"   border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://designertuts.com/paypal-ipn-receiving-instant-payments-in-your-web-application/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
	</channel>
</rss>
