<?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>phpPig &#187; Scripts</title>
	<atom:link href="http://phppig.org/category/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://phppig.org</link>
	<description>PHP scripts and code to help newbies</description>
	<lastBuildDate>Mon, 25 Jul 2011 07:50:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Using In-Browser FTP to manage files on server</title>
		<link>http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/</link>
		<comments>http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 07:50:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=220</guid>
		<description><![CDATA[<p>For the past few months, I have been looking at options to give me an in-browser method of editing/uploading files on my server because I am having to cut costs and get rid of my ISP (namely, HughesNet). Where I live it, we are in an extremely rural area and haven&#8217;t been able to get highspeed <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/">Using In-Browser FTP to manage files on server</a></span>]]></description>
			<content:encoded><![CDATA[<p>For the past few months, I have been looking at options to give me an in-browser method of editing/uploading files on my server because I am having to cut costs and get rid of my ISP (namely, HughesNet). Where I live it, we are in an extremely rural area and haven&#8217;t been able to get highspeed access to the internet without using one of the satellite service providers. Due to the limitations on the service, I have been really been bound to what I could or couldn&#8217;t do online.</p>
<p>Two months ago, AT&#038;T Wireless upgraded our cellphone towers to 3G. Having an iPhone and having downloaded HandyLight in the few hours it was available through the iTunes store, I have been looking for a method of being able to FTP in files and folders to my server through the data connection established with my iPhone (I do have the unlimited data plan on my iPhone and needed a method to utilize this in the fullest capabilities.)</p>
<p>I have tried and tried to find a way to make it work and was just about to throw in the towel when I came across a site that had the exact solution to my problem. <a href="http://www.gerd-tentler.de/tools/filemanager/" target="_blank">FileManager</a> was the answer to my problems. Installing it on my server and integrating it into my homepage was rather simple. All I have to do now is visit my homepage with the data connection from my iPhone and the index page initializes my FTP session in the browser. And using a zip and unzip php script, it takes a lot less time to upload a new folder to the server because I can upload the zip file the decompress on the server.</p>
<p>I can now say goodbye to HughesNet and their high priced/low quality service and hello to a much more efficient and cost effective method of conducting my business online.</p>
<p>For those of you who have HandyLight and have been looking for a way to FTP in and out of a server with it, try this out. I have the homepage protected using .htaccess/.htpasswd to keep others out.</p>
<p>This would also work great if you need to edit or upload files from a public computer or other device. It is a perfect method for you to work on your websites from work, too! ;D</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/220/using-in-browser-ftp-to-manage-files-on-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating basic admin section (part 2 of building full php script)</title>
		<link>http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/</link>
		<comments>http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 23:53:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=203</guid>
		<description><![CDATA[<p>In the first article, we created the entire install script while creating a database and writing the config and .htaccess files for the site. (Files will be written when install script is run.)</p>
<p>We now need to have a way to add posts, pages, and items to our database, as well as edit our site&#8217;s details and <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/">Creating basic admin section (part 2 of building full php script)</a></span>]]></description>
			<content:encoded><![CDATA[<p>In the first article, we created the entire install script while creating a database and writing the config and .htaccess files for the site. (Files will be written when install script is run.)</p>
<p>We now need to have a way to add posts, pages, and items to our database, as well as edit our site&#8217;s details and to add our homepage and paypal address information.</p>
<p>Before we get started, you will need to download the <a href="http://tinymce.moxiecode.com/download.php">TinyMCE</a> open source editor to make adding pages a snap without having to know a bit of html. The first file that we are going write is our index.php file. Go ahead and save the file to Script->admin->index.php.<br />
<code><br />
&lt;?php<br />
 session_start();<br />
 ob_start();<br />
 define( 'ADMIN_ACCESS', 1 );<br />
 $inscript = true;<br />
 include_once('../inc/config.php');<br />
 include_once('../inc/functions.php');<br />
 include_once('./admin-titles.php');<br />
 //login checker<br />
 include_once('./admin-login.php');<br />
 $sql = mysql_query("SELECT `reported` FROM `".$SQL_Ext."_media` WHERE `reported` = '1'");<br />
 $reported = @mysql_num_rows($sql);<br />
 $sql = mysql_query("SELECT `published` FROM `".$SQL_Ext."_media` WHERE `published` = '0'");<br />
 $pending = @mysql_num_rows($sql);<br />
 $idblah = $_GET['id'];<br />
 $pos = strpos($idblah, "UNION SELECT");<br />
 if ($pos === false) {}<br />
 else { echo 'error'; }<br />
 $idblah = $_GET['action'];<br />
 $pos = strpos($idblah, "UNION SELECT");<br />
 if ($pos === false) {}<br />
 else { echo 'error'; }<br />
 $action = makesafe($_GET['action']);<br />
 $id     = intval($_GET['id']);<br />
?&gt;<br />
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;<br />
&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;&lt;?php admin_title($action)?&gt;&lt;/title&gt;<br />
&lt;? include('./images/style.css'); ?&gt;<br />
&lt;script&gt;<br />
 function selectText(){<br />
 document.sitemap.sitemap.focus();<br />
 document.sitemap.sitemap.select();<br />
 }<br />
 &lt;/script&gt;<br />
&lt;script language="javascript" type="text/javascript" src="&lt;?php echo $site_url; ?&gt;/admin/tinymce/jscripts/tiny_mce/tiny_mce.js"&gt;&lt;/script&gt;<br />
&lt;script language="javascript" type="text/javascript"&gt;<br />
tinyMCE.init({<br />
	mode : "textareas",<br />
	theme : "advanced",<br />
	plugins : "table,save,autosave,autosave,cleanup,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print,contextmenu,directionality,inlinepopups,media,nonbreaking,visualchars,devkit,paste,noneditable,layer,halfpage,fullscreen,",<br />
	theme_advanced_buttons1_add_before : "save,separator,",<br />
	theme_advanced_buttons1_add : "fontselect,fontsizeselect",<br />
	theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor",<br />
	theme_advanced_buttons2_add_before: "cut,copy,paste,separator,search,replace,separator",<br />
	theme_advanced_buttons3_add_before : "tablecontrols,separator",<br />
	theme_advanced_buttons3_add : "emotions,iespell,flash,advhr,separator,print,ltr,rtl",<br />
	theme_advanced_buttons4_add_before : "visualchars,nonbreaking,devkit,separator,layer,fullpage,fullscreen",<br />
	table_styles : "Header 1=header1;Header 2=header2;Header 3=header3",<br />
	table_cell_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Cell=tableCel1",<br />
	table_row_styles : "Header 1=header1;Header 2=header2;Header 3=header3;Table Row=tableRow1",<br />
	table_cell_limit : 100,<br />
	table_row_limit : 5,<br />
	table_col_limit : 5,<br />
	theme_advanced_toolbar_location : "top",<br />
	theme_advanced_toolbar_align : "left",<br />
	theme_advanced_path_location : "bottom",<br />
	plugin_insertdate_dateFormat : "%Y-%m-%d",<br />
	plugin_insertdate_timeFormat : "%H:%M:%S",<br />
	extended_valid_elements : "a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",<br />
	external_link_list_url : "example_data/example_link_list.js",<br />
	external_image_list_url : "example_data/example_image_list.js",<br />
	flash_external_list_url : "example_data/example_flash_list.js"<br />
});<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;br&gt;<br />
&lt;center&gt;<br />
&lt;table width="850" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse"&gt;<br />
  &lt;?php<br />
    if($_SESSION['adminloggedin'] == '1') {<br />
  ?&gt;<br />
    &lt;tr&gt;<br />
     &lt;td bgcolor="#0033CC" class="tabletop2" align="center" height="75px"&gt;<br />
       &lt;a class="adminlink" href="index.php"&gt;Home&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_media"&gt;Affiliate Pages&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_advertiser"&gt;CJ Advertisers&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_cats"&gt;Categories&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_pages"&gt;Pages&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_users"&gt;Users &lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=manage_links"&gt;Links&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;!--&lt;a class="adminlink" href="?action=manage_advertisment"&gt;&lt;s&gt;Ads&lt;/s&gt;&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;--&gt;<br />
       &lt;a class="adminlink" href="?action=aff"&gt;Affiliate Info&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=settings"&gt;Settings&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=checkin"&gt;Submissions&lt;/a&gt; (&lt;?=$pending?&gt;) &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=reported"&gt;Reported&lt;/a&gt; (&lt;?=$reported?&gt;)<br />
      &lt;hr width="80%"&gt;<br />
       &lt;a class="adminlink" href="?action=add_media"&gt;Add Article&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_advertiser"&gt;Add Advertiser&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_cat"&gt;Add Category&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_page"&gt;Add Page&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="?action=add_link"&gt;Add Link&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="index.php?action=logout"&gt;Log Out&lt;/a&gt; &lt;font color="#7f7f7f"&gt;&middot;&lt;/font&gt;<br />
       &lt;a class="adminlink" href="&lt;? echo $site_url; ?&gt;/index.php" target="_blank"&gt;View Site&lt;/a&gt;<br />
     &lt;/td&gt;<br />
    &lt;/tr&gt;<br />
  &lt;?php<br />
    }<br />
  ?&gt;<br />
    &lt;tr&gt;<br />
     &lt;td class="maintable" align="center"&gt;<br />
     &lt;br&gt;<br />
        &lt;table width="90%" border="0" cellspacing="0" cellpadding="0" class="table"&gt;<br />
        &lt;tr&gt;<br />
          &lt;td background="./images/menu2.png" bgcolor="#0066FF" class="tabletop"&gt;<br />
            &lt;b&gt;&nbsp;&nbsp;&lt;?php admin_title($action)?&gt;&lt;/b&gt;<br />
          &lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;tr&gt;<br />
        &lt;td bgcolor="#FFFFFF" align="center"&gt;<br />
        &lt;div style="width:95%; text-align:left;"&gt;<br />
&lt;?php<br />
  if($_SESSION['adminloggedin'] == '1')<br />
  {<br />
     if ($action == 'add_media')     { include('admin-add-media.php'); }<br />
     elseif ($action == 'add_link') { include('admin-add-link.php'); }<br />
     elseif ($action == 'add_cat')  { include('admin-add-cat.php'); }<br />
     elseif ($action == 'add_page') { include('admin-add-page.php'); }<br />
     elseif ($action == 'add_advertisments') { include('admin-add-advertisment.php'); }<br />
     elseif ($action == 'aff') { include('admin-affiliate.php'); }<br />
     elseif ($action == 'add_advertiser') { include('admin-add-advertiser.php'); }<br />
     elseif ($action == 'edit_media') { include('admin-edit-media.php'); }<br />
     elseif ($action == 'edit_advertiser') { include('admin-edit-advertiser.php'); }<br />
     elseif ($action == 'edit_link') { include('admin-edit-link.php'); }<br />
     elseif ($action == 'edit_cat')  { include('admin-edit-cat.php'); }<br />
     elseif ($action == 'edit_page') { include('admin-edit-page.php'); }<br />
     elseif ($action == 'edit_user') { include('admin-edit-user.php'); }<br />
     elseif ($action == 'edit_advertisment') { include('admin-edit-advertisment.php'); }<br />
     elseif ($action == 'manage_media') { include('admin-manage-media.php'); }<br />
     elseif ($action == 'manage_advertiser') { include('admin-manage-advertiser.php'); }<br />
     elseif ($action == 'manage_links') { include('admin-manage-links.php'); }<br />
     elseif ($action == 'manage_cats')  { include('admin-manage-cats.php'); }<br />
     elseif ($action == 'manage_pages') { include('admin-manage-pages.php'); }<br />
     elseif ($action == 'manage_users') { include('admin-manage-users.php'); }<br />
     elseif ($action == 'manage_advertisment') { include('admin-manage-advertisment.php'); }<br />
     elseif ($action == 'reported')     { include ('admin-reported.php'); }<br />
              elseif ($action == 'delete_done')<br />
              {<br />
                 mysql_query("DELETE FROM `".$SQL_Ext."_media` WHERE `id` = '$id'");<br />
                 if ($_GET['check'] == 1)<br />
                  { header("Location: index.php?action=checkin&#038;message=Link%20Deleted"); exit; }<br />
                 else<br />
                  { header("Location: index.php?action=manage_media&#038;message=Article%20Deleted"); exit; }<br />
              }<br />
              elseif ($action == 'delete_user_done')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_users WHERE id='$id'");<br />
                 header("Location: index.php?action=manage_users&#038;message=User%20deleted");<br />
                 exit;<br />
              }<br />
              elseif ($action == 'delete_cat_done')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_cats WHERE id='$id'");<br />
                 header("Location: index.php?action=manage_cats&#038;message=Category%20deleted");<br />
                 exit;<br />
              }<br />
              elseif ($action == 'delete_comment')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_comments WHERE id='$id'");<br />
                 header("Location: $site_url/index.php?task=view&#038;id=".makesafe($_GET['link_id']));<br />
                 exit;<br />
              }<br />
              elseif ($action == 'delete_page_done')<br />
              {<br />
                 mysql_query("DELETE FROM ".$SQL_Ext."_pages WHERE id='$id'");<br />
                 header("Location: index.php?action=manage_pages&#038;message=Page%20deleted");<br />
                 exit;<br />
              }<br />
              elseif ($action == 'link_delete_done')<br />
              {<br />
                 mysql_query("DELETE FROM `".$SQL_Ext."_links` WHERE `id` = '$id'");<br />
                 if ($_GET[check] == 1) { header("Location: index.php?action=checkin&#038;message=Unpublished link%20deleted"); exit; }<br />
                 else { header("Location: index.php?action=manage_links&#038;message=Link%20deleted"); exit; }<br />
              }<br />
              elseif ($action == 'config_view')<br />
              {<br />
                  include('config_view.php');<br />
              }<br />
              elseif ($action == 'new_pass')<br />
              {<br />
                  include('admin-new-pass.php');<br />
              }<br />
              elseif ($action == 'settings')<br />
              {<br />
                  include('settings.php');<br />
              }<br />
              elseif ($action == 'checkin')<br />
              {<br />
                  include('admin-checkin.php');<br />
              }<br />
              elseif ($action == 'checkin_done')<br />
              {<br />
                  include('admin-check.php');<br />
              }<br />
              elseif ($action == 'logout')<br />
              {<br />
                  session_destroy();<br />
                  header("Location: index.php");<br />
                  exit;<br />
              }<br />
              else<br />
              {<br />
                  include('./admin-main.php');<br />
              }<br />
  }<br />
  else<br />
  {<br />
     include_once('./admin-login-form.php');<br />
  }<br />
?&gt;<br />
&lt;br&gt;<br />
&lt;/div&gt;<br />
        &lt;/td&gt;<br />
        &lt;/tr&gt;<br />
        &lt;/table&gt;<br />
      &lt;br&gt;<br />
      &lt;br&gt;<br />
     &lt;/td&gt;<br />
    &lt;/tr&gt;<br />
    &lt;/table&gt;<br />
&lt;/center&gt;<br />
&lt;br&gt;<br />
&lt;br&gt;<br />
&lt;/body&gt;&lt;/html&gt;<br />
&lt;?php<br />
  mysql_close();<br />
?&gt;<br />
</code></p>
<p>A brief glimpse of what we have done here: At the beginning, we start the session. If admin is not logged in during the session, the script will take you to a login page, otherwise, it will load the page requested based on the action. Starting on line 117 you will see the code that makes this happen.</p>
<p>Basically what we have done is created a universal page for our site now. All that we will need to do is create a page that writes the page titles and each page for the admin script.</p>
<p>At this point, we are going to write our titles page, which will consist of a function that tells the script how to write each page title. In a new php editor window, let&#8217;s create our admin-titles.php file. (Script->admin->admin-titles.php)</p>
<p>Here is the code that we will use for admin-titles.php:<br />
<code><br />
&lt;?php<br />
function admin_title($action) {<br />
if($action == 'add_advertiser') {<br />
echo 'Add Advertiser';}<br />
if($action == 'edit_advertiser') {<br />
echo 'Edit Advertiser';}<br />
if($action == 'manage_advertiser') {<br />
echo 'Manage Advertiser';}<br />
if($action == 'aff') {<br />
echo 'Edit Affiliate Information';}<br />
else if($action == 'edit_media') {<br />
echo 'Edit Affiliate Page';}<br />
else if($action == 'add_link') {<br />
echo 'Add Link';}<br />
else if($action == 'edit_link') {<br />
echo 'Edit Link';}<br />
else if($action == 'manage_links') {<br />
echo 'Manage Links';}<br />
else if($action == 'edit_cat') {<br />
echo 'Edit Category';}<br />
else if($action == 'edit_user') {<br />
echo 'Edit User';}<br />
else if($action == 'add_page') {<br />
echo 'Add Page';}<br />
else if($action == 'edit_page') {<br />
echo 'Edit Page';}<br />
else if($action == 'manage_pages') {<br />
echo 'Manage Pages';}<br />
else if($action == 'add_cat') {<br />
echo 'Add Category';}<br />
else if($action == 'new_pass') {<br />
echo 'Set new password for user';}<br />
else if($action == 'manage') {<br />
echo 'Manage Affiliate pages';}<br />
else if($action == 'manage_cats') {<br />
echo 'Manage Catergories';}<br />
else if($action == 'manage_users') {<br />
echo 'Manage Users';}<br />
else if($action == 'settings') {<br />
echo 'Settings';}<br />
else if(!isset($_GET['cat_id'])){<br />
echo 'Admin Home';}}<br />
?&gt;<br />
</code><br />
On line 2 we start the function by defining it. The rest of the page tells the function to look at the action. If action = this then we need to write this.</p>
<p>To finish this article up, we are going to write our admin-main.php file. The admin-main page will allow us to edit our homepage text and our paypal address.</p>
<p>In a new php editor, create a file named admin-main.php. (Script->admin->admin-main.php)</p>
<p>Here is the code that we will use for this page:<br />
<code>&lt;? defined( 'ADMIN_ACCESS' ) or die( '' );<br />
if ($_GET[done] == 1)<br />
{<br />
  $homepage = makesafe($_POST['homepage']);<br />
  $paypal = makesafe($_POST['paypal']);<br />
  mysql_query("UPDATE ".$SQL_Ext."_sitespecs SET homepage='".$homepage."', paypal_id='".$paypal."'");<br />
  header("Location: index.php?&#038;message=Settings%20Changed");<br />
}<br />
else<br />
{<br />
$sql = mysql_query("SELECT * FROM ".$SQL_Ext."_sitespecs");<br />
$row = mysql_fetch_assoc($sql);<br />
if ($_GET['message']) {<br />
echo '&lt;div align="center" class="style2"&gt;&lt;br&gt;'.makesafe($_GET['message']).'&lt;br /&gt;&lt;/div&gt;'; }<br />
?&gt;<br />
  &lt;br&gt;<br />
  &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt;<br />
    &lt;tr&gt;<br />
      &lt;td&gt;<br />
 &lt;br&gt;<br />
 &lt;form method="post" action="index.php&#038;done=1"&gt;<br />
&lt;strong&gt;Homepage Text&lt;/strong&gt;&lt;br/&gt;<br />
&lt;textarea cols="70" rows="6" name="homepage"&gt;<br />
&lt;?php echo $row['homepage']; ?&gt;<br />
&lt;/textarea&gt;<br />
&lt;br/&gt;<br />
Paypal Address&lt;br/&gt;<br />
&lt;input type="text" name="paypal" size="70" value="&lt;?php echo $row['paypal_id']; ?&gt;"/&gt;<br />
&lt;input type="submit" name="submit" value="Update"/&gt;<br />
&lt;/form&gt;<br />
      &lt;/td&gt;<br />
    &lt;/tr&gt;<br />
  &lt;/table&gt;<br />
  &lt;?}?&gt;<br />
</code><br />
In the first few lines of code we are telling the page that to check and see if we are done editing. If we are done editing, we need to post the values that we entered in and insert them into the database using the UPDATE sql query.</p>
<p>If we are NOT done editing, then we need to query the database and get the current settings so that they can be edited. We will insert the values of the the homepage in a textarea for easy editing and the paypal address we will place into an input box. </p>
<p>We DO need to display the current information so that we can edit it so we echo the values for those two rows out of the db.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/203/creating-basic-admin-section-part-2-of-building-full-php-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a php script to sell products</title>
		<link>http://phppig.org/193/creating-a-php-script-to-sell-products/</link>
		<comments>http://phppig.org/193/creating-a-php-script-to-sell-products/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 08:41:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=193</guid>
		<description><![CDATA[<p>Ever wonder how some people are able to get sites up and going giving them access to update the content on the site and add pages of new products without knowing a single thing about html?</p>
<p>Marketing a new and exciting product is just one way to make money online. You will find that there is much <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/193/creating-a-php-script-to-sell-products/">Creating a php script to sell products</a></span>]]></description>
			<content:encoded><![CDATA[<p>Ever wonder how some people are able to get sites up and going giving them access to update the content on the site and add pages of new products without knowing a single thing about html?</p>
<p>Marketing a new and exciting product is just one way to make money online. You will find that there is much more money to be made when you have a service to offer people who are just starting out online. </p>
<p>Follow this series of posts in the members section. By the end of the posts, you will have a working content management system with a shopping cart that ACTUALLY works! Plus, you can learn how to <strong>manipulate php to appear as different file types</strong>, build a MySQL database, build a functioning script that works around the MySQL database, and how to write files on the fly&#8230;.Plus let&#8217;s not forget about the making php code to look and quack like xml, yet it is really still php!</p>
<p>We will include all sorts of tools that <i><b><u>EVERY WEBMASTER AND USER NEEDS AND DESIRES</u></b></i>. Goodies will include: RSS feed of products, on the fly XML sitemap, podcasting abilities, RSS feed for podcasts that goes directly to iTunes, shopping cart that will work with paypal (will also show you how to use it with clickbank), easy to use WYSIWYG editor in the admin area that gives you COMPLETE CONTROL over the page being created, and much, much more!</p>
<p>To view a sample of the script that we will be coding, visit <a href="http://scottpdaugherty.com">my personal website</a>. I coded this script and will include the source code to the WHOLE PROJECT as a download at the end of the tutorial.</p>
<p>You won&#8217;t want to miss this advanced lesson on how to create your own working php script that you can customize and sell to people, gaining you respect as a coder and giving your customer a very useful product that they will very likely pay hundreds or thousands of dollars for!</p>
<p>Look in the Member&#8217;s Only section to read this series of articles.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/193/creating-a-php-script-to-sell-products/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Amazon, CJ, and eBay WordPress classes</title>
		<link>http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/</link>
		<comments>http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 08:01:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Wordpress Plugins]]></category>
		<category><![CDATA[amazon associate webservices]]></category>
		<category><![CDATA[cj webservices]]></category>
		<category><![CDATA[ebay partner network]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=184</guid>
		<description><![CDATA[<p>I am considering having a member&#8217;s only area where member will be able to view and download source code for Amazon, commission junction and eBay affiliate program plugins. </p>
<p>Still just thinking about it now. If this were to happen, how many people would actually be interested in this? Comment to this post if you would be <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/">Amazon, CJ, and eBay WordPress classes</a></span>]]></description>
			<content:encoded><![CDATA[<p>I am considering having a member&#8217;s only area where member will be able to view and download source code for Amazon, commission junction and eBay affiliate program plugins. </p>
<p>Still just thinking about it now. If this were to happen, how many people would actually be interested in this? Comment to this post if you would be interested in viewing and downloading source code, having videos readily available on how to use the code, and instructions on how to make plugins and making your own comparison shopping plugin. Maybe even have code samples and instructions on how to make your own complete affiliate script!</p>
<p>Debating on it&#8230;.Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/184/amazon-cj-and-ebay-wordpress-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: Interpreting data from CJ API Rest call</title>
		<link>http://phppig.org/169/interpreting-data-from-cj-api-rest-call/</link>
		<comments>http://phppig.org/169/interpreting-data-from-cj-api-rest-call/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 08:21:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=169</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://phppig.org/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-169">Password:<br />
<input name="post_password" id="pwbox-169" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/169/interpreting-data-from-cj-api-rest-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Protected: CJ Webservices REST API call code</title>
		<link>http://phppig.org/161/cj-webservices-rest-api-call/</link>
		<comments>http://phppig.org/161/cj-webservices-rest-api-call/#comments</comments>
		<pubDate>Sun, 29 Aug 2010 22:57:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=161</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://phppig.org/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-161">Password:<br />
<input name="post_password" id="pwbox-161" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/161/cj-webservices-rest-api-call/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Action Affiliate Software presale</title>
		<link>http://phppig.org/103/action-affiliate-software-presal/</link>
		<comments>http://phppig.org/103/action-affiliate-software-presal/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 10:38:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=103</guid>
		<description><![CDATA[﻿<p>I have coded a new script and plugin for WordPress. Action Affiliate is officially ready for the market.</p>
<p>With the Action Affiliate script, it is a stand alone site. It provides you the ability to add content to keep your site from being deemed as a thin affiliate site within the search engines. With the ability to <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/103/action-affiliate-software-presal/">Action Affiliate Software presale</a></span>]]></description>
			<content:encoded><![CDATA[<p>I have coded a new script and plugin for WordPress. Action Affiliate is officially ready for the market.</p>
<p><span style="float:right; padding:3px"><img src="http://phpPig.org/phpaffstandard.bmp" width="300px" height="300px"></span>With the Action Affiliate script, it is a stand alone site. It provides you the ability to add content to keep your site from being deemed as a thin affiliate site within the search engines. With the ability to pull listings from three separate networks (Amazon, CJ, and eBay), you can provide your site&#8217;s visitors with a comparison of prices of products from these networks while never having to login to your affiliate networks and search for adds.</p>
<p>By providing your visitor with a good review, article, or other useful content describing a product, you can literally have them ready to buy the product. That&#8217;s where Action Affiliate comes in. At the end of the article, there will be listings showing products that match your keywords. They click through, by the product, and you earn money.</p>
<p>With the stand-alone version, I have provided you with every tool known to man to get high SEO rank. This is a php script but it allows you to have seo friendly url&#8217;s, comes complete with an XML sitemap creator, and allows for imaging uploads. It also includes a user friendly admin section that gives you a super easy to use WYSIWYG (what you see is what you get) editor that automatically formats your typing into html (no need to know how to program).</p>
<p>The WordPress edition works with the same three affiliate networks. If you already love WordPress (like my wife), this is the best alternative for you. Let&#8217;s say you have had luck writing blog posts about yoga mats and have made a decent amount of commission from the posts but you have to constantly login to your affiliate networks, get the links for the products and images, and then play the copy-paste routine. You have wasted 10-15 minutes of your time getting the ads and pasting them in.</p>
<p>With Action Affiliate, you will never have to search for links again. Action Affiliate for WordPress is based on shortcode so all you would have to do is enter the following text into your post: <table border="0"><tr><td><h2><font size="3">YogaAccessories (TM) 1/4'' Extra Thick High Density Yoga Mat (Phthalate Free) - Teal Green</font></h2></a><br><font size="2"><b> </font></b><br><img src="http://ecx.images-amazon.com/images/I/51tFZlk-4ZL._SL160_.jpg" title="YogaAccessories (TM) 1/4'' Extra Thick High Density Yoga Mat (Phthalate Free) - Teal Green" border="0"></a><br>At 6.2mm, the YogaAccessories&trade; Extra Thick Deluxe Yoga Mat is a full 1/4'' thick, an extra long 74'', weighs almost 4 lbs, and is one of the thickest sticky mats on the market. The mats come in a variety of colors that are strong and vivacious, but not overpowering in their brightness - and of course, completely latex and heavy metal free, plus no phthalates are used in the inks and dyes. This well-made exercise mat will add comfort to your yoga workouts. Because of its high quality, this deluxe mat will last longer than most standard foam mats. When shopping around for a yoga mat, note that what many other companies call a 1/4'' mat is actually 4.5 - 5.2 mm in thickness -- considerably thinner than this mat. A thicker non-slip mat is good for all types of yoga, especially for restorative poses. Reward yourself and your body with an Extra Thick Deluxe Yoga Mat, and see why this is the most popular sticky mat found in yoga studios, schools, fitness clubs, and at home!<p>Looking for a unique yoga mat? YogaAccessories&trade; Extra Thick Deluxe Yoga Mats are also available in the Chakra Series or custom printed with your own logo or design -- in the same vibrant colors that make our yoga mats so appealing. <br></td></tr>
<tr><td><form action="/go.php?YogaAccessories_TM_14_Extra_Thick_High_Density_Yoga_Mat_Phthalate_Free_Teal_Green" method="post" enctype="multipart/form-data"><input name="link" type="hidden" value="http://www.amazon.com/YogaAccessories-Extra-Thick-Density-Phthalate/dp/B000PUHFSA%3FSubscriptionId%3D05VTE22MFHGQ29ZMNK82%26tag%3Dhttprockbotto-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3DB000PUHFSA" /><input type="image" name="Submit" src="http://phppig.org/wp-content/plugins/ActionAffiliate/images/more.jpg" /></form>
</td></tr></table> <a title="BLUE 68" x 24" x 1/4" (6 mm) Pad Mat for Exercise & Yoga w/ EZ Buy Now Inside"  href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&amp;toolid=10005&campid=5335866424&amp;customid=EZnichestore&icep_item=250988068225&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=rss" target="_blank" ><b>BLUE 68" x 24" x 1/4" (6 mm) Pad Mat for Exercise & Yoga w/ EZ Buy Now Inside</b></a><table border="0" cellpadding="8"><tr><td><a title="BLUE 68" x 24" x 1/4" (6 mm) Pad Mat for Exercise & Yoga w/ EZ Buy Now Inside" href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&amp;toolid=10005&campid=5335866424&amp;customid=EZnichestore&icep_item=250988068225&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=rss"><img border="0" src="http://thumbs.ebaystatic.com/pict/250988068225_0.jpg" /></a></td><td><strong>US $0.99</strong> (0 Bid)<br /> End Date: Saturday Feb-04-2012 13:21:20 PST<br /><a title="BLUE 68" x 24" x 1/4" (6 mm) Pad Mat for Exercise & Yoga w/ EZ Buy Now Inside" href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?icep_ff3=2&amp;toolid=10005&campid=5335866424&amp;customid=EZnichestore&icep_item=250988068225&ipn=psmain&icep_vectorid=229466&kwid=902099&mtid=824&kw=rss">Bid now</a> | <a title="BLUE 68" x 24" x 1/4" (6 mm) Pad Mat for Exercise & Yoga w/ EZ Buy Now Inside" href="http://rover.ebay.com/rover/1/711-53200-19255-0/1?ff3=4&amp;toolid=10005&campid=5335866424&amp;customid=EZnichestore&amp;mpre=http%3A%2F%2Fcgi1.ebay.com%2Fws%2FeBayISAPI.dll%3FMfcISAPICommand%3DMakeTrack%26item%3D250988068225%26ssPageName%3DRSS%3AB%3ASRCH%3AUS%3A104">Add to watch list</a></td></tr></table><hr size="1" noshade="noshade" />. Let Action Affiliate find relative ads and place them into your post. How long did it take you to type in the short code? Probably less than 15 seconds. I don&#8217;t know about you but my time is THE SINGLE most valuable thing that I have.</p>
<p>Both versions of Action Affiliate also include jump links that go through a link on your site, then redirects to your advertiser&#8217;s site. This keeps those pesky anti-virus programs from blocking your tracking cookie and puts the money in your pocket! (Hopefully you will see a spike in commission from this feature alone.)</p>
<p>A lot of time and effort has gone into this script and plugin to make sure that YOU WILL SUCCEED!</p>
<p>You can download the version that is right for you below before they go for sale on their own site! I have decided to let a limited number of copies sell on phpPig.org before selling them on phpAffiliateScript.com.</p>
<p>The versions that you get from phpPig.org are the Deluxe packages which means you may install them on as many sites as you own! How much does Action Affiliate cost? Previous versions of the script that didn&#8217;t include all of the features that I am giving you today has cost literally thousands of dollars. The lowest amount that I charged was $497. Today, I am giving you the opportunity to have the stand alone script for only $97. This $100 less than I will charge when I move it to http://phpAffiliateScript.com. The WordPress plugin is only $77. Again, it will sell for no less than $177 when I move it to the new site. Plus, I am giving you a 30-day, no hassle money back guarantee.</p>
<table>
<tr>
<td width="50%">
Download the Stand Alone version of Action Affiliate here:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="UNXZHJV6X7BNN">
<input type="image" src="http://phpPig.org/005_13.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
</td>
<td width="50%">
Download the WordPress plugin of Action Affiliate here:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="YCF374SEG8U5E">
<input type="image" src="http://phpPig.org/005_13.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
</td>
</tr>
</table>
<p><center><img src="http://phpPig.org/009_32.gif" border="0"></center><br />
The choice is yours! You can spend hours of your precious time adding links that may or may not get you commission due to tracking cookie issues, or you can take advantage of this special deal and start getting all of the commissions that are rightfully yours! Take the chance and try it risk-free for 30 days.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/103/action-affiliate-software-presal/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Beta Testers Needed: php Affiliate Script</title>
		<link>http://phppig.org/100/beta-testers-needed-php-affiliate-script/</link>
		<comments>http://phppig.org/100/beta-testers-needed-php-affiliate-script/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 19:22:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=100</guid>
		<description><![CDATA[<p>I have finished a php script that utilizes the CJ, Amazon, and eBay Partner Network&#8217;s services. </p>
<p>It works as simple as this&#8230;.You add a post like you would in a blog. (Quality content gets the traffic). Before you submit the page, you enter a single keyword phrase. The keyword phrase is what is going to get <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/100/beta-testers-needed-php-affiliate-script/">Beta Testers Needed: php Affiliate Script</a></span>]]></description>
			<content:encoded><![CDATA[<p>I have finished a php script that utilizes the CJ, Amazon, and eBay Partner Network&#8217;s services. </p>
<p>It works as simple as this&#8230;.You add a post like you would in a blog. (Quality content gets the traffic). Before you submit the page, you enter a single keyword phrase. The keyword phrase is what is going to get the links from your selected affiliate programs.</p>
<p>If you want to use just cj, then you are able to turn off the other 2, and vice versa. I have included every tactic to make this the most search engine friendly script on the market. </p>
<p>I need 5 more testers.</p>
<p>If you wish to test it, simply sign up for our newsletter, and I will send the download link to you free of charge.</p>
<form method="post" action="http://phpPig.org/addlead.php">
First Name:<br />
<input type="text" name="name" size="20" />
<br/><br />
Email Address:<br />
<input type="text" name="email" size="20" />
<br/></p>
<input type="submit" name="submit" value="Signup and Get Me Started"/>
<p>You will receive an email within a few minutes with a download link. Be sure to allow phpPig.org to your safe sender&#8217;s list so that it is not filtered out as SPAM.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/100/beta-testers-needed-php-affiliate-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Cookies With PHP</title>
		<link>http://phppig.org/88/setting-cookies-with-ph/</link>
		<comments>http://phppig.org/88/setting-cookies-with-ph/#comments</comments>
		<pubDate>Mon, 17 May 2010 21:01:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=88</guid>
		<description><![CDATA[<p>I am currently adding a shopping cart to a CMS script that I have written. The object is to eventually have a script that many people will find useful on their sites by allowing them to generate traffic from their articles as well as from their shop. In this post, I will discuss some of the <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/88/setting-cookies-with-ph/">Setting Cookies With PHP</a></span>]]></description>
			<content:encoded><![CDATA[<p>I am currently adding a shopping cart to a <a href="http://thecollard.com/" target="_blank">CMS script</a> that I have written. The object is to eventually have a script that many people will find useful on their sites by allowing them to generate traffic from their articles as well as from their shop. In this post, I will discuss some of the code used to make the cart work, how it works, and how I will implement the code into my own script, which again is available for free download at <http://thecollard.com" target="_blank">The Collard</a>.</p>
<p>One of the first things that I needed to do was create sessions. This will allow my users to create a unique session and only allow the products added to their cart during the visit from their machine. In the previous versions of the collard, their was no session variables defined so I set this up by editing the functions.php file of this script. If you are not using this script, you will need to create a functions.php page and add this function to that page.</p>
<p><code>&lt;?php<br />
function Session()<br />
{<br />
//This will generate an encrypted string and will set the cookie. It will also be used in the cookieId field in the<br />
//cart<br />
if(isset($_COOKIE["cartid"]))<br />
{<br />
return $_COOKIE["cartId"];<br />
}<br />
else<br />
{<br />
//No cookie was found. We will set the cookie and return the session ID<br />
session_start();<br />
setcookie("cartId",session_id(),time()+((3600*24)*30);<br />
return session_id;<br />
}<br />
}<br />
?&gt;</code></p>
<p>This code has now created session ids and will return to that session id if visited again within the next 30 days. This allows the user to add products to a cart and if they decide to think about it, need to wait until payday, etc., the products are now in the shopping cart and will be available to them when they come back to complete the purchase.</p>
<p>Now to explain how I did this. I used the setcookie function to create the cookie on their machine. In order for this cookie to work for the next 30 days, I defined that by adding the time function to the string. There are 3600 seconds in every hour (60*60). I multiply that by 24 hours in a day and then by 30 days in a month. That sets the cookie to last exactly 30 days from the moment it was created.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/88/setting-cookies-with-ph/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Server Migration Information</title>
		<link>http://phppig.org/81/wordpress-server-migration-information/</link>
		<comments>http://phppig.org/81/wordpress-server-migration-information/#comments</comments>
		<pubDate>Mon, 03 May 2010 06:37:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=81</guid>
		<description><![CDATA[<p>Thinking of moving your WordPress site from one server to another? Here are detailed instructions on how to do it via FTP. If you follow these instructions to the letter, you will not have any problems with the migration.</p>
<p>First things first, if you don&#8217;t have a good quality FTP client, I recommend to download Filezilla. It <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/81/wordpress-server-migration-information/">WordPress Server Migration Information</a></span>]]></description>
			<content:encoded><![CDATA[<p>Thinking of moving your WordPress site from one server to another? Here are detailed instructions on how to do it via FTP. If you follow these instructions to the letter, you will not have any problems with the migration.</p>
<p>First things first, if you don&#8217;t have a good quality FTP client, I recommend to download <a href="http://filezilla-project.org/download.php" target="_blank" title="Filezilla">Filezilla</a>. It is open source, free, and the fastest FTP software that I have used to date.</p>
<p>So&#8230;.You have FTP software and you are ready to go. You first download the entire folder of that the blog is in from your server to your local computer. Once it is downloaded to your local machine, you can either search through each file to find the server path (not recommended because this can literally take hours), or you can download a free application for your computer to do this for you. <a href="http://www.rjlsoftware.com/software/utility/search/" target="_blank">Simple Search and Replace</a> allows you to choose a folder on your machine and it will search all files for specified text and replace it with whatever text you choose. You will need to search for your old server path and replace with new path. You can get the server paths from your hosting company.</p>
<p>Next, you will need to download your SQL database from phpMyAdmin. My recommendations for this is to login into phpMyAdmin and choose to save as a file. If your hosting company allows you can save as .gz but if not save as .zip instead of .sql. This will allow for a faster download to your computer.</p>
<p>If you don&#8217;t have .zip software, you can download <a href="http://www.7-zip.org/download.html" target="_blank">7 zip file manager</a> for free. Again, it is open source and performs very well. I recommend it and use it myself. It allows you to unzip any format and works well.</p>
<p>Once the file is downloaded, unzip it and open it in a php editor. I say this because I use <a href="http://download.cnet.com/tsWebEditor/3000-10248_4-10376995.html" target="_blank">tsWebEditor</a> because it is free and open source.</p>
<p>Once you have the .sql file open, you can select edit->find (or CTRL+F for the keyboard shortcut), and enter in the old server path and the new server path where the blog will be installed. If you are using tsWebEditor, be sure to select from start in the options box and then select replace all. Save this file but keep it open. </p>
<p>Login on your new hosting site and create a new database. Whenever it active, you need to login to the phpMyAdmin for that database and the easiest method to get the new database uploaded is to select SQL from the options and enter the new database in there. If you have a large database (5mb or larger), it is probably easiest to select part of the code from the sql file that you have open in tsWebEditor and use the cut/paste method of getting it into the database. You can import about 1500 lines per cut/paste this way.</p>
<p>Most hosting companies won&#8217;t allow a database larger than 1mb to be uploaded and this is why I suggest getting your new database uploaded using this method. </p>
<p>Once you have the entire database uploaded, there is one last file to edit with the details of your new server prior to uploading the folder to your new server. You will need to open wp-config.php in the root folder and edit the details of your database. Most of the time, your database location is localhost, though I know if you are moving to GoDaddy, the database location is actually a separate server from where your site will be uploaded. Be sure that this information is correct!</p>
<p>You are just about ready to upload this folder to the server now. Last thing to do is make sure that there is no .html files anywhere in the root of your folder. Sometimes, your old server will have 500.html, 501.html, etc. in the root of your server and these can actually cause problems with your new server being able to parse php. Simply delete these files. Also, if there is a file named error_log, delete it as well. It will server no purpose on your new server.</p>
<p>Once you have done this, upload the entire folder to your new server. Once you have completed the upload, it is now safe to point your domain to the new host. This typically can take up to 48 hours but is completed within a couple hours most of the time. Once you are on the new server, you are now safe to either delete the files from your old server or cancel the old hosting plan.</p>
<p>If you need help moving your wordpress site from one server to another, I can help you for only $47 and can have it done usually within 24 hours of payment. </p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="FZMKCUUZE2UZG">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
<p>Contact me at the paypal address for details or questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/81/wordpress-server-migration-information/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ebay Partner Network WordPress Plugin</title>
		<link>http://phppig.org/78/ebay-partner-network-wordpress-plugin/</link>
		<comments>http://phppig.org/78/ebay-partner-network-wordpress-plugin/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 11:51:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=78</guid>
		<description><![CDATA[<p>WordPressers: Have you wondered how to make a little additional money while blogging using ebay partner network? Now you can add targeted ads to your blog and make revenue with the ebay partner network.</p>
<p>This plugin installs in just seconds and you can add as many listing as you would like to your blog post by using <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/78/ebay-partner-network-wordpress-plugin/">Ebay Partner Network WordPress Plugin</a></span>]]></description>
			<content:encoded><![CDATA[<p>WordPressers: Have you wondered how to make a little additional money while blogging using ebay partner network? Now you can add targeted ads to your blog and make revenue with the ebay partner network.</p>
<p>This plugin installs in just seconds and you can add as many listing as you would like to your blog post by using a little bit of shortcode. Simply type in [ebay keywords="Your keywords" amount="Number of returns to your post"] and that is it! How simple is that?</p>
<p>Like the cjAffShop plugin, it publishes the results in the content of your post with a natural look to your blog. Simply put the code ANYWHERE in the post that you like! </p>
<p>You will need to upload to small files to the root folder of your blog and then install the plugin to make it work. It takes only a couple of minutes using dial up and mere seconds for highspeed users. </p>
<p>Included with the download is:<br />
FTP Software (Windows only(necessary if you don&#8217;t have a way to upload files to your server))<br />
The two files necessary for plugin to work to be uploaded in blog&#8217;s root folder.<br />
Plugin .zip file to upload from WordPress admin section.</p>
<p>You can demo the plugin here: <a href="http://scottpdaugherty.com/2010/04/28/funny_people_revie/" target="_blank">Funny People Review</a>. </p>
<p>Download the plugin instantly here:</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="92MAZAEMDMSZS">
<input type="image" src="http://phpPig.org/ebayp.jpg" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/78/ebay-partner-network-wordpress-plugin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Keep your site&#8217;s visitors by decreasing page load time</title>
		<link>http://phppig.org/50/keep-your-sites-visitors-by-decreasing-page-load-time/</link>
		<comments>http://phppig.org/50/keep-your-sites-visitors-by-decreasing-page-load-time/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 10:02:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=50</guid>
		<description><![CDATA[<p>If you are new to php or a seasoned veteran and aren&#8217;t utilizing the gzip compression features of php, you could be missing out on a lot of traffic. Did you know that you could be losing traffic before they land on your page because the page takes too long to load? That is a fact! <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/50/keep-your-sites-visitors-by-decreasing-page-load-time/">Keep your site&#8217;s visitors by decreasing page load time</a></span>]]></description>
			<content:encoded><![CDATA[<p>If you are new to php or a seasoned veteran and aren&#8217;t utilizing the gzip compression features of php, you could be missing out on a lot of traffic. Did you know that you could be losing traffic before they land on your page because the page takes too long to load? That is a fact! According to market research, people will click away before they actually arrive because a page takes too long to load!</p>
<p>Fellow php coders and newbies, there is a way to keep your site&#8217;s visitors by decreasing the load time of a page significantly. You can turn on gzip compression that works just like WinZip or other software that archives files on your computer. It only takes a single line of code but it has to be read first, so if you are using WordPress you would put this in the top index file. If you are using oscommerce, this would need to go in the application top file in the includes folder.Â  For custom scripts, simply place this as the first line of code read by the server.</p>
<p>Here is the code:<br />
<code><br />
&lt;?php<br />
ob_start('ob_gzhandler');<br />
?><br />
</code><br />
Now this will make the server load all pages faster. But, it is set at a default setting of 6 which still can slow things down a bit. In order to increase the compression, you have to define it. The compression is on a scale of 1 to 9, 9 being the highest compression. Please note that if you are running on a sluggish server, increasing the compression size can knock the server down and send your website down. Be sure that you are indeed using a good webhost before increasing your gzip compression. </p>
<p>To increase the compression and activate gzip, put this line of code on the first file your server reads:<br />
<code><br />
&lt;?php<br />
ini_set('zlib.output_compression_level', 9); ob_start('ob_gzhandler');<br />
?><br />
</code><br />
I hope this helps you keep your site&#8217;s visitors and wish each and everyone of you success! If you are worried that your webhost isn&#8217;t up to par, I recommend this <a href="best/webhosting_company.html" target="_blank">host</a>!<img src="http://www.awltovhc.com/image-2484123-10365666" width="1" height="1" border="0"/></p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/50/keep-your-sites-visitors-by-decreasing-page-load-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making clean url&#8217;s using CJ Webservices API</title>
		<link>http://phppig.org/45/making-clean-urls-using-cj-webservices-api/</link>
		<comments>http://phppig.org/45/making-clean-urls-using-cj-webservices-api/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 03:16:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=45</guid>
		<description><![CDATA[<p>There are many advertisers on CJ&#8217;s webservices that have a product catalog that use links that can easily be cleaned up on your site using mod rewrite commands. A simple str_replace function and updating the .htaccess file on your server will do the trick. It doesn&#8217;t matter if you are using SOAP or REST api calls, <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/45/making-clean-urls-using-cj-webservices-api/">Making clean url&#8217;s using CJ Webservices API</a></span>]]></description>
			<content:encoded><![CDATA[<p>There are many advertisers on CJ&#8217;s webservices that have a product catalog that use links that can easily be cleaned up on your site using mod rewrite commands. A simple str_replace function and updating the .htaccess file on your server will do the trick. It doesn&#8217;t matter if you are using SOAP or REST api calls, you can easily rewrite the urls as outlined in this article.</p>
<p>I am going to base the content off of the same code that I am running on one of my sites. If anybody reading this article is a boater&#8217;s world affiliate, the code is here for you to grab, by the way. I am only showing one of the links. You will need to rewrite the url&#8217;s going from each domain that cj uses for tracking purposes. Also, it is detrimental to insure that the click-123456-12345678 is indeed correct. The first number is your PID that you have to enter into the API code to make the call so if you get that number wrong, you definitely need to double check it. The second number in the series is the creative, I think, but am not clear on.</p>
<p>We are using the boaters world connection because of it&#8217;s simple urls. The urls appear like this: http://boatersworld.com/product/12345.htm&amp;cjsku=12345. If you notice the product number and cjsku is the same number.</p>
<ol>
<li>Run the script on your site to get an idea of how the links look. You should copy the link to text editor where you will later update this to the .htaccess file.</li>
<li>View source code to copy the url in html. You will need this to update your webservices API call to present a friendly link to your site&#8217;s visitor. The .htaccess will redirect the link to the advertisers page and you still get commission or referral fees for any sales or leads generated.</li>
<li>Open the .htaccess file. At the bottom of the RewriteRules and before the RewriteBase statement, add the following command: RewriteRule ^product/([a-zA-Z 0-9?-]+)-([a-zA-Z 0-9?-]+) http://jdoqocy.com/click-123456-12345678?url=http://www.boatersworld.com/product/$1.htm&amp;cjsku=$1.</li>
<li>In the php code where you make your API call it is important to copy the url exactly from the source code from your browser. The code uses the utf-8 code for symbols. i.e. &lt;space&gt; is notated %20. After you make your API call in the php code, your code should look like this [SOAP REFERENCE]:<br />
<code>$click_url = $result['searchReturn']['products']['products'][$i]['clickUrl'];</code><br />
This is for the actual url to the product. Now below all the calls, you should add these lines:<br />
<code>$click_url = str_replace("%2F","/",$click_url);<br />
$click_url = str_replace("%3A",":",$click_url);</code><br />
These commands will convert the UTF-8 to the actual symbols used in the url. (:/) Now for the line of code that I have in my .htaccess file, I will use that to rewrite the urls on my site like this.<br />
<code>$click_url = str_replace("http://www.tkqlhce.com/click-123456-12345678?","http://alabamatombigbeefishing.info/product",$click_url);</code><br />
This will change the url to show my domain instead of the tracking domain. Now to complete the cleaning of the urls so that the url looks like this: http://alabamatombigbeefishing.info/product/MP84149749-Catfish_Master_Combo_8_Medium.html, we will add the following code:<br />
<code>function seo_str($string)<br />
 {<br />
      $string = html_entity_decode($string, ENT_QUOTES);<br />
      $string = ereg_replace("[^a-zA-Z0-9 ]", "", $string);<br />
      $string = ereg_replace(" +", " ", $string);<br />
      $string = str_replace(" ", "_", $string);<br />
      return $string;<br />
  }<br />
$click_url = str_replace("url=http://www.boatersworld.com/product","",$click_url);<br />
$click_url = str_replace(".htm","",$click_url);<br />
$click_url = str_replace("cjsku","",$click_url);<br />
$click_url = str_replace("&#038;=","",$click_url);<br />
$name1 = seo_str($name);<br />
$click_url2 = 'http://alabamatombigbeefishing.info/product/'.$sku.'-'.$name1.'.html';<br />
&lt;a href=$click_url2&gt;$name&lt;/a&gt;</code><br />
You can preview the code in action at the bottom of this page: <a href="http://alabamatombigbeefishing.info/page/3-Mississippi_State_Record_Flathead_Catfish.html" target="_blank" rel="follow" title="Mississippi State Record Flathead Catfish">Mississippi State Record Flathead caught on Tombigbee</a>. Note that we wrote a custom function named seo_str at the very beginning of this code. This function allows us to make an SEO friendly url that .htaccess and the search engines, by the way, will love. </p>
<p>You have now gotten rid of the ugly urls and have made urls that look like they belong to your site. You should notice an increase in clicks now, as well. A lot of visitors won&#8217;t click through if the url in the status bar doesn&#8217;t look friendly. My click rate increased 5 times within 2 months of implementing this on my various sites.</p>
<p>If you aren&#8217;t using the CJ API but are interested in it and haven&#8217;t found a plugin for wordpress that looks natural to your site, check out the cjAffShop plugin that I have written. It works seamlessly with wordpress allowing you to add as many advertisers, keywords, and returns as you wish. Before our wedding, my wife showed off a dress that she was interested in on her blog. She wound up not buying that style dress but really liked it. You would never know that she didn&#8217;t just put the picture and link on her site to show it off, looking at it. Preview for yourself at <a href="http://www.polkaspotfarm.com/2010/01/24/i-think-i-found-a-dress/" target="_blank">PolkaSpotFarm</a>.</p>
<p>You can get this plugin now, for a limited time, for only $27. I have both the SOAP and REST versions available, though, if your server can handle the REST call, I recommend. CJ is slowly phasing out the SOAP API calls.<br />
<!--SOAP API--></p>
<form action="https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="8JCGAPT7TB298">
<input type="image" src="http://phpPig.org/soap.gif" border="0" height="50%" width="50%" name="submit" alt="Instant Download!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
<p><br/><br />
<!--REST API--></p>
<form action="https://www.paypal.com/cgi-bin/webscr" target="_blank" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="GPYQDYBAGHR3U">
<input type="image" src="http://phpPig.org/rest.gif" border="0" height="50%" width="50%" name="submit" alt="Instant Download!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"><br />
</form>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/45/making-clean-urls-using-cj-webservices-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CJ affiliates and eBay affiliates: Prepare for a new set of free tools</title>
		<link>http://phppig.org/22/cj-affiliates-and-ebay-affiliates-prepare-for-a-new-set-of-free-tools/</link>
		<comments>http://phppig.org/22/cj-affiliates-and-ebay-affiliates-prepare-for-a-new-set-of-free-tools/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 07:26:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=22</guid>
		<description><![CDATA[<p>I have been showing you how to add links to your wordpress sites using the CJ api service but the code is almost ready to upload for a brand new CMS. The script will be released under GNU/GPL and will feature plug-ins that will search the CJ advertiser of your choice for your keywords in both <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/22/cj-affiliates-and-ebay-affiliates-prepare-for-a-new-set-of-free-tools/">CJ affiliates and eBay affiliates: Prepare for a new set of free tools</a></span>]]></description>
			<content:encoded><![CDATA[<p>I have been showing you how to add links to your wordpress sites using the CJ api service but the code is almost ready to upload for a brand new CMS. The script will be released under GNU/GPL and will feature plug-ins that will search the CJ advertiser of your choice for your keywords in both your article posting and page posting.</p>
<p>The script features a user-friendly admin section and an SEO friendly front-end that will guarantee that your site gets higher optimization and you can start making profits strictly from organic traffic.</p>
<p>Also, a plug-in has been written to search YouTube for videos relating to your specified keywords in your post and article. </p>
<p>The script will be available to demo starting on December 1, 2009 and the code will be available immediately. </p>
<p>I look forward to seeing/ hearing from you in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/22/cj-affiliates-and-ebay-affiliates-prepare-for-a-new-set-of-free-tools/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New ebay and CJ affiliate script almost ready for launch</title>
		<link>http://phppig.org/19/new-ebay-and-cj-affiliate-script-almost-ready-for-launch/</link>
		<comments>http://phppig.org/19/new-ebay-and-cj-affiliate-script-almost-ready-for-launch/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 19:42:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://phppig.org/?p=19</guid>
		<description><![CDATA[<p>So, I know that I have spoken about this script several times in the past. I am in the last few days of testing and adding more features to the script before releasing it to the public.</p>
<p>The latest design has videos from youtube included in the page to show video results of whatever product you are <span style="color:#777"> . . . &#8594; Read More: <a href="http://phppig.org/19/new-ebay-and-cj-affiliate-script-almost-ready-for-launch/">New ebay and CJ affiliate script almost ready for launch</a></span>]]></description>
			<content:encoded><![CDATA[<p>So, I know that I have spoken about this script several times in the past. I am in the last few days of testing and adding more features to the script before releasing it to the public.</p>
<p>The latest design has videos from youtube included in the page to show video results of whatever product you are promoting. This feature helps sell a product, especially a music instrument. <a href="http://rockbottommusicgear.com/music_instruments/563-Behringer_CS100_CompressorSustainer_Pedal.html" target="_blank">Behringer CS100 Compressor Sustainer Pedal</a> at RockBottomMusicGear.com. RockBottomMusicGear.com isn&#8217;t the exact design of the script but it is the closest version that we have up running right now. This script uses a data feed from Zzounds.com and you click the link to go direct to Zzounds. Below that we have the ebay listings, the video results then results from commission junction advertisers.</p>
<p>If you would like to receive a beta version of this script to test out, leave a comment. When we get it ready we will offer it to our beta testers first.</p>
<p>We are still deciding whether or not to release the script under GNU open source or to copyright and sell the script, however, beta testers will receive a FREE version of the script to test drive for us.</p>
]]></content:encoded>
			<wfw:commentRss>http://phppig.org/19/new-ebay-and-cj-affiliate-script-almost-ready-for-launch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.303 seconds -->

