Category Archives: SEO Tips

iPageRank Page Rank and SEO Tools Site Scripts

Run your own website statistics service using this clone of ipagerank.org, a popular website ranking service. Run your own website statistics service using this clone of ipagerank.org, a popular website ranking service. The script checks Google Pagerank, Alexa, DMOZ, Yahoo Directory, Yahoo Backlinks, Altavista Backlinks, AllTheWeb Backlinks and the domains age.

 

 

<?php
/**
* PHPMailer language file: refer to English translation for definitive list
* Arabic Version, UTF-8
* by : bahjat al mostafa <bahjat983@hotmail.com>
*/


$PHPMAILER_LANG['authenticate']         = 'SMTP Error: لم نستطع تأكيد الهوية.';
$PHPMAILER_LANG['connect_host']         = 'SMTP Error: لم نستطع الاتصال بمخدم SMTP.';
$PHPMAILER_LANG['data_not_accepted']    = 'SMTP Error: لم يتم قبول المعلومات .';
//$PHPMAILER_LANG['empty_message']        = 'Message body empty';
$PHPMAILER_LANG['encoding']             = 'ترميز غير معروف: ';
$PHPMAILER_LANG['execute']              = 'لم أستطع تنفيذ : ';
$PHPMAILER_LANG['file_access']          = 'لم نستطع الوصول للملف: ';
$PHPMAILER_LANG['file_open']            = 'File Error: لم نستطع فتح الملف: ';
$PHPMAILER_LANG['from_failed']          = 'البريد التالي لم نستطع ارسال البريد له : ';
$PHPMAILER_LANG['instantiate']          = 'لم نستطع توفير خدمة البريد.';
//$PHPMAILER_LANG['invalid_email']        = 'Not sending, email address is invalid: ';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer غير مدعوم.';
//$PHPMAILER_LANG['provide_address']      = 'You must provide at least one recipient email address.';
$PHPMAILER_LANG['recipients_failed']    = 'SMTP Error: الأخطاء التالية ' .
'فشل في الارسال لكل من : ';
$PHPMAILER_LANG['signing']              = 'خطأ في التوقيع: ';
//$PHPMAILER_LANG['smtp_connect_failed']  = 'SMTP Connect() failed.';
//$PHPMAILER_LANG['smtp_error']           = 'SMTP server error: ';
//$PHPMAILER_LANG['variable_set']         = 'Cannot set or reset variable: ';
?>

&amp;nbsp;

PHP component exclusive for codecanyon SEO Tips

This is small foot print PHP component exclusive for codecanyon. The main target of this component is to provide simple & easy way to use SEO friendly URLs in your site especially for developers who are don’t use any of PHP frameworks even if you use framework this component make URLs more SEO friendly. The second target is to handle all your SEO meta in one place.

 

 

<?php
/*~ class.pop3.php
.---------------------------------------------------------------------------.
|  Software: PHPMailer - PHP email class                                    |
|   Version: 5.1                                                            |
|   Contact: via sourceforge.net support pages (also www.codeworxtech.com)  |
|      Info: http://phpmailer.sourceforge.net                               |
|   Support: http://sourceforge.net/projects/phpmailer/                     |
| ------------------------------------------------------------------------- |
|     Admin: Andy Prevost (project admininistrator)                         |
|   Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net |
|          : Marcus Bointon (coolbru) coolbru@users.sourceforge.net         |
|   Founder: Brent R. Matzelle (original founder)                           |
| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved.               |
| Copyright (c) 2001-2003, Brent R. Matzelle                                |
| ------------------------------------------------------------------------- |
|   License: Distributed under the Lesser General Public License (LGPL)     |
|            http://www.gnu.org/copyleft/lesser.html                        |
| This program is distributed in the hope that it will be useful - WITHOUT  |
| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     |
| FITNESS FOR A PARTICULAR PURPOSE.                                         |
| ------------------------------------------------------------------------- |
| We offer a number of paid services (www.codeworxtech.com):                |
| - Web Hosting on highly optimized fast and secure servers                 |
| - Technology Consulting                                                   |
| - Oursourcing (highly qualified programmers and graphic designers)        |
'---------------------------------------------------------------------------'
*/


/**
* PHPMailer - PHP POP Before SMTP Authentication Class
* NOTE: Designed for use with PHP version 5 and up
* @package PHPMailer
* @author Andy Prevost
* @author Marcus Bointon
* @copyright 2004 - 2009 Andy Prevost
* @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL)
* @version $Id: class.pop3.php 444 2009-05-05 11:22:26Z coolbru $
*/


/**
* POP Before SMTP Authentication Class
* Version 5.0.0
*
* Author: Richard Davey (rich@corephp.co.uk)
* Modifications: Andy Prevost
* License: LGPL, see PHPMailer License
*
* Specifically for PHPMailer to allow POP before SMTP authentication.
* Does not yet work with APOP - if you have an APOP account, contact Richard Davey
* and we can test changes to this script.
*
* This class is based on the structure of the SMTP class originally authored by Chris Ryan
*
* This class is rfc 1939 compliant and implements all the commands
* required for POP3 connection, authentication and disconnection.
*
* @package PHPMailer
* @author Richard Davey
*/


class POP3 {
/**
* Default POP3 port
* @var int
*/

public $POP3_PORT = 110;

/**
* Default Timeout
* @var int
*/

public $POP3_TIMEOUT = 30;

/**
* POP3 Carriage Return + Line Feed
* @var string
*/

public $CRLF = "\r\n";

/**
* Displaying Debug warnings? (0 = now, 1+ = yes)
* @var int
*/

public $do_debug = 2;

/**
* POP3 Mail Server
* @var string
*/

public $host;

/**
* POP3 Port
* @var int
*/

public $port;

/**
* POP3 Timeout Value
* @var int
*/

public $tval;

/**
* POP3 Username
* @var string
*/

public $username;

/**
* POP3 Password
* @var string
*/

public $password;

/////////////////////////////////////////////////
// PROPERTIES, PRIVATE AND PROTECTED
/////////////////////////////////////////////////

private $pop_conn;
private $connected;
private $error;     //  Error log array

/**
* Constructor, sets the initial values
* @access public
* @return POP3
*/

public function __construct() {
$this->pop_conn  = 0;
$this->connected = false;
$this->error     = null;
}

/**
* Combination of public events - connect, login, disconnect
* @access public
* @param string $host
* @param integer $port
* @param integer $tval
* @param string $username
* @param string $password
*/

public function Authorise ($host, $port = false, $tval = false, $username, $password, $debug_level = 0) {
$this->host = $host;

//  If no port value is passed, retrieve it
if ($port == false) {
$this->port = $this->POP3_PORT;
} else {
$this->port = $port;
}

//  If no port value is passed, retrieve it
if ($tval == false) {
$this->tval = $this->POP3_TIMEOUT;
} else {
$this->tval = $tval;
}

$this->do_debug = $debug_level;
$this->username = $username;
$this->password = $password;

//  Refresh the error log
$this->error = null;

//  Connect
$result = $this->Connect($this->host, $this->port, $this->tval);

if ($result) {
$login_result = $this->Login($this->username, $this->password);

if ($login_result) {
$this->Disconnect();

return true;
}

}

//  We need to disconnect regardless if the login succeeded
$this->Disconnect();

return false;
}

/**
* Connect to the POP3 server
* @access public
* @param string $host
* @param integer $port
* @param integer $tval
* @return boolean
*/

public function Connect ($host, $port = false, $tval = 30) {
//  Are we already connected?
if ($this->connected) {
return true;
}

/*
On Windows this will raise a PHP Warning error if the hostname doesn't exist.
Rather than supress it with @fsockopen, let's capture it cleanly instead
*/


set_error_handler(array(&amp;$this, 'catchWarning'));

//  Connect to the POP3 server
$this->pop_conn = fsockopen($host,    //  POP3 Host
$port,    //  Port #
$errno,   //  Error Number
$errstr,  //  Error Message
$tval);   //  Timeout (seconds)

//  Restore the error handler
restore_error_handler();

//  Does the Error Log now contain anything?
if ($this->error &amp;&amp; $this->do_debug >= 1) {
$this->displayErrors();
}

//  Did we connect?
if ($this->pop_conn == false) {
//  It would appear not...
$this->error = array(
'error' => "Failed to connect to server $host on port $port",
'errno' => $errno,
'errstr' => $errstr
);

if ($this->do_debug >= 1) {
$this->displayErrors();
}

return false;
}

//  Increase the stream time-out

//  Check for PHP 4.3.0 or later
if (version_compare(phpversion(), '5.0.0', 'ge')) {
stream_set_timeout($this->pop_conn, $tval, 0);
} else {
//  Does not work on Windows
if (substr(PHP_OS, 0, 3) !== 'WIN') {
socket_set_timeout($this->pop_conn, $tval, 0);
}
}

//  Get the POP3 server response
$pop3_response = $this->getResponse();

//  Check for the +OK
if ($this->checkResponse($pop3_response)) {
//  The connection is established and the POP3 server is talking
$this->connected = true;
return true;
}

}

/**
* Login to the POP3 server (does not support APOP yet)
* @access public
* @param string $username
* @param string $password
* @return boolean
*/

public function Login ($username = '', $password = '') {
if ($this->connected == false) {
$this->error = 'Not connected to POP3 server';

if ($this->do_debug >= 1) {
$this->displayErrors();
}
}

if (empty($username)) {
$username = $this->username;
}

if (empty($password)) {
$password = $this->password;
}

$pop_username = "USER $username" . $this->CRLF;
$pop_password = "PASS $password" . $this->CRLF;

//  Send the Username
$this->sendString($pop_username);
$pop3_response = $this->getResponse();

if ($this->checkResponse($pop3_response)) {
//  Send the Password
$this->sendString($pop_password);
$pop3_response = $this->getResponse();

if ($this->checkResponse($pop3_response)) {
return true;
} else {
return false;
}
} else {
return false;
}
}

/**
* Disconnect from the POP3 server
* @access public
*/

public function Disconnect () {
$this->sendString('QUIT');

fclose($this->pop_conn);
}

/////////////////////////////////////////////////
//  Private Methods
/////////////////////////////////////////////////

/**
* Get the socket response back.
* $size is the maximum number of bytes to retrieve
* @access private
* @param integer $size
* @return string
*/

private function getResponse ($size = 128) {
$pop3_response = fgets($this->pop_conn, $size);

return $pop3_response;
}

/**
* Send a string down the open socket connection to the POP3 server
* @access private
* @param string $string
* @return integer
*/

private function sendString ($string) {
$bytes_sent = fwrite($this->pop_conn, $string, strlen($string));

return $bytes_sent;
}

/**
* Checks the POP3 server response for +OK or -ERR
* @access private
* @param string $string
* @return boolean
*/

private function checkResponse ($string) {
if (substr($string, 0, 3) !== '+OK') {
$this->error = array(
'error' => "Server reported an error: $string",
'errno' => 0,
'errstr' => ''
);

if ($this->do_debug >= 1) {
$this->displayErrors();
}

return false;
} else {
return true;
}

}

/**
* If debug is enabled, display the error message array
* @access private
*/

private function displayErrors () {
echo '<pre>';

foreach ($this->error as $single_error) {
print_r($single_error);
}

echo '</pre>';
}

/**
* Takes over from PHP for the socket warning handler
* @access private
* @param integer $errno
* @param string $errstr
* @param string $errfile
* @param integer $errline
*/

private function catchWarning ($errno, $errstr, $errfile, $errline) {
$this->error[] = array(
'error' => "Connecting to the POP3 server raised a PHP warning: ",
'errno' => $errno,
'errstr' => $errstr
);
}

//  End of class
}
?>

&amp;nbsp;

PHP Scripts plugins are avialable SEO Tips

Seo Panel is a control panel to easily manage all seo related works of your websites. All also it will help you to track track and increase the performance of your web sites in internet. This open source software released on Jan 3rd of 2010. With in this short time lots of web masters are using this software.The main advantage of seo panel is its extendability as any one can develop seo plugins for it and submit it to seo panel team. They will release it in their site after review it. These plugins are avialable all around the globe. This will surely extend the features of seo control panel in future.

 

 

<?php
/*
Securimage Test Script
Mike Challis
http://www.642weather.com/weather/scripts.php

Upload this PHP script to your web server and call it from the browser.
The script will tell you if you meet the requirements for running Securimage.

*/

//error_reporting(E_ALL ^ E_NOTICE); // Report all errors except E_NOTICE warnings
error_reporting(E_ALL); // Report all errors and warnings (very strict, use for testing only)
ini_set('display_errors', 1); // turn error reporting on


if (isset($_GET['testimage']) &amp;&amp; $_GET['testimage'] == '1') {
$im = imagecreate(225, 225);
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);

$red   = imagecolorallocate($im, 255,   0,   0);
$green = imagecolorallocate($im,   0, 255,   0);
$blue  = imagecolorallocate($im,   0,   0, 255);

// draw the head
imagearc($im, 100, 120, 200, 200,  0, 360, $black);
// mouth
imagearc($im, 100, 120, 150, 150, 25, 155, $red);
// left and then the right eye
imagearc($im,  60,  95,  50,  50,  0, 360, $green);
imagearc($im, 140,  95,  50,  50,  0, 360, $blue);

imagestring($im, 5, 15, 1, 'PHP can make images!', $blue);
imagestring($im, 2, 5, 20, ':) :) :)', $black);
imagestring($im, 2, 5, 30, ':) :)', $black);
imagestring($im, 2, 5, 40, ':)', $black);

imagestring($im, 2, 150, 20, '(: (: (:', $black);
imagestring($im, 2, 168, 30, '(: (:', $black);
imagestring($im, 2, 186, 40, '(:', $black);

imagepng($im, null, 3);
exit;
}

function print_status($supported)
{
if ($supported) {
echo "<span style=\"color:green;\">Yes!</span>";
} else {
echo "<span style=\"color:red; font-weight: bold;\">No</span>";
}
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>CAPTCHA PHP Requirements Test</title>
<script type="text/javascript" language="javascript">
<!--
function toggleVisibility(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
<style type="text/css" media="all">
body
{
background-color:#E6E6E6;
font-family:"Courier New", Arial, sans-serif, monospace;
font-size:1em;
color:#333333;
}
.group
{
background-color:#FFFFFF;
border:1px #CCCCCC solid;
margin-top:25px;
margin-bottom:50px;
text-align:left;
}

.errors {
color: #ff0000;
}
</style>
</head>

<body>

<div style="margin-left:20%; margin-right:20%; padding:20px;">
<h2>CAPTCHA PHP Requirements Test</h2>
<p>
This script will test your PHP installation to see if (Securimage) CAPTCHA will run on your server.
Make sure to perform both tests using the links below.
</p>

<?php
// Check for safe mode
$safe_mode_is_on = ((boolean)@ini_get('safe_mode') === false) ? 0 : 1;
if($safe_mode_is_on){
echo '<p><span style="color:red;">Warning: Your web host has PHP safe_mode turned on.</span> PHP safe_mode can cause problems like sending mail failures and file permission errors.'."\n";
echo 'PHP safe_mode is better turned off, relying on this feature might work, but is highly discouraged. Contact your web host for support.</p>'."\n";
}

// requires PHP 5.1 or higher
$phpversion = substr(PHP_VERSION, 0, 6);
if($phpversion >= 5.1) {
//OK
}else{
echo '<p><span style="color:red;">Fast Secure Contact Form requires PHP version 5.1 or higher</span><br />
Warning: Your web host has not upgraded from PHP4 to PHP5. PHP4 was officially discontinued August 8, 2008 and is no longer considered safe. PHP5 is faster, has more features, and is and safer. You need PHP5. Please upgrade PHP in order to proceed. Contact your web host for support.<p>'
;

}
?>


<ul>
<li>
<strong>PHP Version:</strong>
<?php echo phpversion(); ?> <?php print_status( $phpversion >= 5.1 ); ?>
</li>
<li>
<strong>System:</strong>
<?php echo PHP_OS; ?>

</li>
<li>
<strong>GD Support:</strong>
<?php print_status($gd_support = extension_loaded('gd')); ?>
</li>
<?php if ($gd_support) $gd_info = gd_info(); else $gd_info = array(); ?>
<?php if ($gd_support): ?>
<li>
<strong>GD Version:</strong>
<?php echo $gd_info['GD Version']; ?>
</li>
<?php endif; ?>
<li>
<strong>TTF Support (FreeType):</strong>
<?php print_status($gd_support &amp;&amp; $gd_info['FreeType Support']); ?>
<?php if ($gd_support &amp;&amp; $gd_info['FreeType Support'] == false): ?>
<br />No FreeType support.  Cannot use TTF fonts, but it will use GD fonts instead.
<?php endif; ?>
</li>

<li>
<strong>imagettftext Support:</strong>
<?php print_status( function_exists('imagettftext') ); ?>
</li>

<li>
<strong>imagettfbbox Support:</strong>
<?php print_status( function_exists('imagettfbbox') ); ?>
</li>

<li>
<strong>imagecreatetruecolor Support:</strong>
<?php print_status( function_exists('imagecreatetruecolor') ); ?>
</li>

<li>
<strong>imagefilledrectangle Support:</strong>
<?php print_status( function_exists('imagefilledrectangle') ); ?>
</li>

<li>
<strong>imagecolorallocatealpha Support:</strong>
<?php print_status( function_exists('imagecolorallocatealpha') ); ?>
</li>

<li>
<strong>JPEG Support:</strong>
<?php

if ( isset($gd_info['JPG Support']) ) {
print_status($gd_support &amp;&amp; $gd_info['JPG Support']);
} else if ( isset($gd_info['JPEG Support']) ) {
print_status($gd_support &amp;&amp; $gd_info['JPEG Support']);
}

?>
</li>
<li>
<strong>PNG Support:</strong>
<?php print_status($gd_support &amp;&amp; $gd_info['PNG Support']); ?>
</li>
<li>
<strong>GIF Read Support:</strong>
<?php print_status($gd_support &amp;&amp; $gd_info['GIF Read Support']); ?>
</li>
<li>
<strong>GIF Create Support:</strong>
<?php print_status($gd_support &amp;&amp; $gd_info['GIF Create Support']); ?>
</li>
<li>
<strong>Directory /captcha/temp/</strong>
<?php
$check_this_dir = '../temp';
if(is_writable($check_this_dir)) {
echo '<span style="color: green">OK - Writable</span> ' . substr(sprintf('%o', fileperms($check_this_dir)), -4);
} else if(!file_exists($check_this_dir)) {
echo '<span style="color: red; font-weight: bold;">Directory not found, a <a href="http://codex.wordpress.org/Changing_File_Permissions" target="_blank">permissions</a> problem may have prevented this directory from being created.</span>';
echo ' ' .'Fixing the actual problem is recommended, but you can uncheck this setting on the contact form options page: "Use CAPTCHA without PHP session" and the captcha will work this way just fine (as long as PHP sessions are working).';
} else {
echo '<span style="color: red; font-weight: bold;">Directory Unwritable (<a href="http://codex.wordpress.org/Changing_File_Permissions" target="_blank">fix permissions</a>)</span>.';
echo ' ' .'Permissions are:' . ' ' .substr(sprintf('%o', fileperms($check_this_dir)), -4);
echo ' ' .'Fixing this may require assigning 0755 permissions or higher (e.g. 0777 on some hosts. Try 0755 first, because 0777 is sometimes too much and will not work.)';
echo ' ' .'Fixing the actual problem is recommended, but you can uncheck this setting on the contact form options page: "Use CAPTCHA without PHP session" and the captcha will work this way just fine (as long as PHP sessions are working).';
}
?>
<br />
</li>
</ul>

<?php if ($gd_support): ?>
Since you can see this...<br /><br />
<img src="index.php?testimage=1" alt="Test Image" align="bottom" />
<?php else: ?>
Based on the requirements, you do not have what it takes to run (Securimage) CAPTCHA :(
<?php endif; ?>

<p>
<b><a href="index.php">Try the PHP Requirements Test again</a></b><br />
<a href="captcha_test.php">Try the CAPTCHA Test</a><br />
<a href="../../admin/index.php">Go back to Admin page</a>
</p>

<p>PHP Scripts and WordPress plugins by Mike Challis<br />
<a href="http://www.642weather.com/weather/scripts.php">Free PHP Scripts</a><br />
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;amp;hosted_button_id=8086141">Donate</a>, even small amounts are appreciated<br />
Contact Mike Challis for support: <a href="http://www.fastsecurecontactform.com/support">(Mike Challis)</a>
</p>
</div>
<?php
//if( isset($_GET['phpinfo']) ) { phpinfo();}
?>
</body>
</html>

&amp;nbsp;

SEO Automatic Backlinks Generator PHP Scripts

This is a very easy to set up virtually self maintaining php script that can be easily install and ran on any shared web hosting provider or any web server with PHP and MySQL access. This script has unlimited power by creating a limitless amount of backlinks for anyone who runs it while providing a FREE Service to everyone else Google has announced recently that they are going to CRACK down on the Sales of Backlinks.

 

 

<?php

if ( isset($_GET['prefix']) &amp;&amp; preg_match('/^[a-zA-Z0-9]{15,17}$/',$_GET['prefix']) ){
// no session
$prefix = $_GET['prefix'];

include 'securimage.php';

$char_length = 4;
$chars = 'ABCDEFHKLMNPRSTUVWYZ234578';
$chars_num = '234578'; // do not change this or the code will break!!
// one random position always has to be a number so that a 4 letter swear word could never appear
$rand_pos = mt_rand( 0, $char_length - 1 );
$captcha_word  = '';
for ( $i = 0; $i < $char_length; $i++ ) {
// this rand character position is a number only so that a 4 letter swear word could never appear
if($i == $rand_pos) {
$pos = mt_rand( 0, strlen( $chars_num ) - 1 );
$char = $chars_num[$pos];
} else {
$pos = mt_rand( 0, strlen( $chars ) - 1 );
$char = $chars[$pos];
}
$captcha_word .= $char;
}

$img = new securimage();
$img->code_length = 4;

$img->image_width   = 175;
$img->image_height  = 60;

if(isset($_GET['ctf_sm_captcha']) &amp;&amp; $_GET['ctf_sm_captcha'] == 1) {
$img->image_width   = 132;
$img->image_height  = 45;
}

//set some settings
$img->nosession = true;
$img->prefix = $prefix;
$img->captcha_path = getcwd() . '/temp/';
if(file_exists($img->captcha_path . $prefix . '.php') &amp;&amp; is_readable( $img->captcha_path . $prefix . '.php' ) ) {
include( $img->captcha_path . $prefix . '.php' );
$img->captcha_word = $captcha_word;
} else {
$img->captcha_word = $captcha_word;
}

$img->use_multi_text = true;
$img->use_transparent_text = true;
$img->text_transparency_percentage = 20;
$img->num_lines = 3;
$img->perturbation = 0.6; // 1.0 = high distortion, higher numbers = more distortion
$img->multi_text_color = array(
'#6666FF','#660000','#3333CC','#993300','#0060CC',
'#339900','#6633CC','#330000','#006666','#CC3366',
);
if (isset($_GET['difficulty']) &amp;&amp; $_GET['difficulty'] == 1 ) {
$img->perturbation = 0.5; // 1.0 = high distortion, higher numbers = more distortion
$img->num_lines = 2;
$img->multi_text_color = array('#6666FF','#660000','#3333CC','#993300','#0060CC');
}
if (isset($_GET['difficulty']) &amp;&amp; $_GET['difficulty'] == 2 ) {
$img->perturbation = 0.7; // 1.0 = high distortion, higher numbers = more distortion
$img->num_lines = 6;
}
if (isset($_GET['no_trans']) &amp;&amp; $_GET['no_trans'] == 1) {
$img->use_transparent_text = false;
}
$img->charset = 'ABCDEFHKLMNPRSTUVWYZ234578';
$img->ttf_file = getcwd() . '/ttffonts/ahg-bold.ttf';   // single font
$img->line_color = new Securimage_Color(rand(0, 64), rand(64, 128), rand(128, 255));
$img->image_type = 'png';
$img->background_directory = getcwd() . '/backgrounds';
$img->ttf_font_directory  = getcwd() . '/ttffonts';
$img->show('');
if(!file_exists($img->captcha_path . $prefix . '.php')) {
if ( $fh = fopen( $img->captcha_path . $prefix . '.php', 'w' ) ) {
fwrite( $fh, '<?php $captcha_word = \'' . $captcha_word . '\'; ?>' );
fclose( $fh );
@chmod( $img->captcha_path . $prefix . '.php', 0755 );
}
}
unset($img);
exit;
} else {
// session
include 'securimage.php';

$img = new securimage();
$img->code_length = 4;

$img->image_width   = 175;
$img->image_height  = 60;

if(isset($_GET['ctf_sm_captcha']) &amp;&amp; $_GET['ctf_sm_captcha'] == 1) {
$img->image_width   = 132;
$img->image_height  = 45;
}

//set some settings
$img->form_num = 1;
if (isset($_GET['ctf_form_num']) &amp;&amp; is_numeric($_GET['ctf_form_num']) &amp;&amp; $_GET['ctf_form_num'] < 100){
$img->form_num = $_GET['ctf_form_num'];
}
$img->use_multi_text = true;
$img->use_transparent_text = true;
$img->text_transparency_percentage = 20;
$img->num_lines = 3;
$img->perturbation = 0.6; // 1.0 = high distortion, higher numbers = more distortion
$img->multi_text_color = array(
'#6666FF','#660000','#3333CC','#993300','#0060CC',
'#339900','#6633CC','#330000','#006666','#CC3366',
);
if (isset($_GET['difficulty']) &amp;&amp; $_GET['difficulty'] == 1 ) {
$img->perturbation = 0.5; // 1.0 = high distortion, higher numbers = more distortion
$img->num_lines = 2;
$img->multi_text_color = array('#6666FF','#660000','#3333CC','#993300','#0060CC');
}
if (isset($_GET['difficulty']) &amp;&amp; $_GET['difficulty'] == 2 ) {
$img->perturbation = 0.7; // 1.0 = high distortion, higher numbers = more distortion
$img->num_lines = 6;
}
if (isset($_GET['no_trans']) &amp;&amp; $_GET['no_trans'] == 1) {
$img->use_transparent_text = false;
}
$img->charset = 'ABCDEFHKLMNPRSTUVWYZ234578';
$img->ttf_file = getcwd() . '/ttffonts/ahg-bold.ttf';   // single font
$img->line_color = new Securimage_Color(rand(0, 64), rand(64, 128), rand(128, 255));
$img->image_type = 'png';
$img->background_directory = getcwd() . '/backgrounds';
$img->ttf_font_directory  = getcwd() . '/ttffonts';
$img->show('');

unset($img);
exit;
}

?>

&amp;nbsp;

PHP Scripts for Search Engine Optimization

The Trellian SEO Toolkit v2 is a Search Engine Optimization application that features all the Search Engine Optimization tools you will ever need to manage your web site and reach the top of the search engines, The Trellian SEO Toolkit is priced at only US $299.95 and includes the following the Search Engine Optimization tools.

 

 

<?php
/*
Fast Secure Contact Form - PHP Script
Author: Mike Challis
http://www.FastSecureContactForm.com/
*/

//do not allow direct access
if ( strpos(strtolower($_SERVER['SCRIPT_NAME']),strtolower(basename(__FILE__))) ) {
header('HTTP/1.0 403 Forbidden');
exit('Forbidden');
}

// fixes no gettext support error: Fatal error: Call to undefined function _()
if (!function_exists('_')) {
function _($string) {
return $string;
}
}

// requires PHP 5.1 or higher
$phpversion = substr(PHP_VERSION, 0, 6);
if($phpversion >= 5.1) {

if (!isset($contact_form_language_override))
$contact_form_language_override = '';

require $contact_form_path . 'contact-form.php';
if (class_exists('FSCForm') &amp;&amp; !isset($fsc_form) ) {
$fsc_form = new FSCForm();
}
if (isset($fsc_form)) {
echo $fsc_form->form_do($contact_form, $contact_form_path, $contact_form_language_override);
}

}else{
echo '<p><span style="color:red;">'._('Fast Secure Contact Form requires PHP version 5.1 or higher').'</span><br />'.
_('Please upgrade PHP in order to proceed').'<p>';

}
unset($contact_form);
unset($contact_form_language_override);
unset($fsc_form);
?>

&amp;nbsp;

PHP SEO Surf is a freeware SEO software

SEO Surf is a freeware SEO software. It is a powerful yet easy to use software that is meant to assist both novice and expert SEO enthusiasts. It allows you to quickly analyze any web page and find out what makes it hot for the search engines. It also allows you to shortlist, follow up and manage potential link partners just by simple clicks as you surf the net. Backward link management will no longer be a painful task.

 

 

<?php
/*
Fast Secure Contact Form - PHP Script
Author: Mike Challis
http://www.FastSecureContactForm.com/
*/

//do not allow direct access
if ( strpos(strtolower($_SERVER['SCRIPT_NAME']),strtolower(basename(__FILE__))) ) {
header('HTTP/1.0 403 Forbidden');
exit('Forbidden');
}

// copy settings from one form to another

// copy settings requested
if ( isset($_POST['ctf_action'])
&amp;&amp; $_POST['ctf_action'] == _('Copy Settings')
&amp;&amp; isset($_POST['fsc_copy_what'])
&amp;&amp; isset($_POST['fsc_this_form'])
&amp;&amp; is_numeric($_POST['fsc_this_form'])
&amp;&amp; isset($_POST['fsc_destination_form']) ) {

$copy_what = $_POST['fsc_copy_what'];
$this_form = $_POST['fsc_this_form'];
$destination_form = $_POST['fsc_destination_form'];

// get the global options from the database
$fsc_bk_gb = $this->get_option("fsc_form_gb");

// get the options to copy from
if($this_form == 1)
$this_form_arr = $this->get_option("fsc_form");
else
$this_form_arr = $this->get_option("fsc_form$this_form");

// add slashes on get options array
foreach($this_form_arr as $key => $val) {
$this_form_arr[$key] = addslashes($val);
}

$ok = 0;
if ($destination_form == '1'){
// form 1
if ($copy_what == 'styles') {
$destination_form_arr = $this->get_option("fsc_form");
foreach($destination_form_arr as $key => $val) {
$destination_form_arr[$key] = addslashes($val);
}
$destination_form_arr = $this->fsc_copy_styles($this_form_arr,$destination_form_arr);
$this->set_option("fsc_form", $destination_form_arr);
} else {
$this->set_option("fsc_form", $this_form_arr);
}

$ok = 1;
}
if ($destination_form == 'all'){
// multi-forms > 1
for ($i = 2; $i <= $fsc_bk_gb['max_forms']; $i++) {
if ($copy_what == 'styles') {
$destination_form_arr = $this->get_option("fsc_form$i");
foreach($destination_form_arr as $key => $val) {
$destination_form_arr[$key] = addslashes($val);
}
$destination_form_arr = $this->fsc_copy_styles($this_form_arr,$destination_form_arr);
$this->set_option("fsc_form$i", $destination_form_arr);
} else {
$this->set_option("fsc_form$i", $this_form_arr);
}
}
$ok = 1;
}else if (is_numeric($destination_form) &amp;&amp; $destination_form > 1 ){
// form x
if ($copy_what == 'styles') {
$destination_form_arr = $this->get_option("fsc_form$destination_form");
foreach($destination_form_arr as $key => $val) {
$destination_form_arr[$key] = addslashes($val);
}
$destination_form_arr = $this->fsc_copy_styles($this_form_arr,$destination_form_arr);
$this->set_option("fsc_form$destination_form", $destination_form_arr);
} else {
$this->set_option("fsc_form$destination_form", $this_form_arr);
}
$ok = 1;
}

if(!$ok){
// bail out
die(_('Requested form to copy settings from is not found.'));
}

// success
if ($destination_form == 'all'){
echo '<div id="message"><p>'.sprintf(_('Form %d settings have been copied to all forms.'),$this_form).'</p></div>';
}else{
echo '<div id="message"><p>'.sprintf(_('Form %d settings have been copied to form %d.'),$this_form,$destination_form).'</p></div>';
}

} // end backup action

?>

&amp;nbsp;

PHP Encoder is your best choice seo tips

IonCube PHP Encoder is your best choice for protecting your PHP code from being stolen. It’s compatible with both PHP4 and PHP5. The software is based on bytecode encoding. Your scripts will require run-time modules to be installed on the web server in order to decrypt your script into machine language and render the result of execution readable as usual to the end user different from other encoding system that

 

 

<?php
/*
Fast Secure Contact Form - PHP Script
Author: Mike Challis
http://www.FastSecureContactForm.com/
*/

//do not allow direct access
if ( strpos(strtolower($_SERVER['SCRIPT_NAME']),strtolower(basename(__FILE__))) ) {
header('HTTP/1.0 403 Forbidden');
exit('Forbidden');
}

// lost password page
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $fsc_site['site_charset']; ?>" />
<title><?php echo _('Fast Secure Contact Form - PHP'); ?> - <?php echo _('Lost Password'); ?></title>
<meta name="robots" content="noindex" />
<link rel="stylesheet" type="text/css" href="style.css" media="screen" />
<script type="text/javascript" src="../common.js"></script>
<script type="text/javascript" src="../contact-form.js"></script>
</head>
<body>
<div id="container">
<div id="header">
<h1><?php echo _('Fast Secure Contact Form - PHP'); ?> - <?php echo _('Lost Password'); ?></h1>
<ul id="nav_main">
<li><a href="index.php" title="<?php echo _('Admin'); ?>"><?php echo _('Admin')?></a></li>
</ul>
</div>
<div id="main">
<div id="content">
<?php
if ( isset($_GET['action']) &amp;&amp; $_GET['action'] == 'rp' &amp;&amp; isset($_GET['key']) &amp;&amp; isset($_GET['login']) ) {

$ok = 1;
// key
$key = '';
$password_error = '';
if (preg_match('/^[a-zA-Z0-9]{20}$/',$_GET['key']))
$key = $_GET['key'];
if ( empty( $key ) || !is_string( $key ) || $key != $fsc_site['pwd_reset_key'] ) {
$password_error = _('Invalid key');
$ok = 0;
}

$login = $_GET['login'];
if ( empty($login) || !is_string($login) || $login != $fsc_site['admin_usr'] ) {
$password_error = _('Invalid login');
$ok = 0;
}
if ($ok &amp;&amp; isset($_POST['pass1']) &amp;&amp; $_POST['pass2'] != '' &amp;&amp; $_POST['pass1'] == $_POST['pass2'] ) {
// change now
// reset the password
$fsc_site['pwd_reset_key'] = '';
$fsc_site['admin_pwd'] = 'hashed_'. md5($_POST['pass1']);
$this->set_option("fsc_site", $fsc_site);
// set login credentials
// reset cookie
$admin_pwd_c = str_replace('hashed_', '',$fsc_site['admin_pwd']);
// set cookie
$scripturlparts = explode('/', $_SERVER['PHP_SELF']);
$scriptfilename = $scripturlparts[count($scripturlparts)-1];
$cookie_path = preg_replace("/$scriptfilename$/i", '', $_SERVER['PHP_SELF']);
//setcookie("fsc_verify", md5($fsc_site['admin_usr'].'%'.$admin_pwd_c),  time() + 3600, $cookie_path);
setcookie("fsc_verify", md5($fsc_site['admin_usr'].'%'.$admin_pwd_c), 0, $cookie_path);
echo _('Your new password has been reset. Be sure to remember it. Go to <a href="index.php">admin page</a>.');

} else if($ok) {
// form to type in new password form
echo _('This is where you reset your password.');

if (isset($_POST['pass1']) &amp;&amp; $_POST['pass2'] != '' &amp;&amp; $_POST['pass1'] != $_POST['pass2']) {
$password_error = _('Password mismatch');
}
if (isset($_POST['pass2']) &amp;&amp; $_POST['pass1'] != '' &amp;&amp; $_POST['pass1'] != $_POST['pass2']) {
$password_error = _('Password mismatch');
}
?>
<br />
<br />
<div><?php echo _('Reset Password:');?></div>
<div></div>
<fieldset>


<form name="resetpasswordform" id="resetpasswordform" action="<?php echo "lost-pw.php?action=rp&amp;key=$key&amp;login=" . rawurlencode($login); ?>" method="post">
<p>

<?php
echo  _('Please enter your new password.') . '<br />'."\n";
if ( $password_error != '' ) echo '<span style="color:red">'. $password_error .'</span><br />'."\n";
?>
</p>
<p>
<label for="pass"><?php echo _('New Password:') ?><br />
<input type="password" name="pass1" id="pass1" value="" size="20" autocomplete="off"  /></label>
</p>

<p>
<label for="pass2"><?php echo _('Confirm New Password:') ?><br />
<input type="password" name="pass2" id="pass2" value="" size="20" autocomplete="off"  /></label>
</p>

<p>
<input type="submit" name="Submit" value="<?php echo $this->ctf_output_string( _('Reset Password')); ?>" tabindex="100" />
</p>
</form>


</fieldset>
<?php

} else {
// print error and form to start over
echo _('This is where you retrieve a lost password.');
?>
<br />
<br />
<div><?php echo _('Lost Password:');?></div>
<div></div>
<fieldset>


<form name="lostpasswordform" id="lostpasswordform" action="<?php echo 'lost-pw.php?action=lostpassword' ?>" method="post">
<p>

<?php
echo  _('Please enter your username or email address. You will receive a link to create a new password via email.') . '<br />'."\n";
if ( $password_error != '' ) echo '<span style="color:red">'._('Password recovery failed:') .' '. $password_error .'</span><br />'."\n";
?>
<label for="user_login"><?php echo _('Username or E-mail:') ?><br />
<input type="text" name="user_login" id="user_login" value="<?php echo $this->ctf_output_string($user_login); ?>" size="50" tabindex="10" /></label>
</p>
<p>
<input type="submit" name="Submit" value="<?php echo $this->ctf_output_string( _('Get New Password')); ?>" tabindex="100" />
</p>
</form>


</fieldset>
<?php
}

} else {
// show lost password form

$ok = 0;
$password_error = '';
$user_data = '';
if ( isset($_GET['action']) &amp;&amp; $_GET['action'] == 'lostpassword' ) {
if ( empty( $_POST['user_login'] ) ) {
$password_error = _('Enter a username or e-mail address.');
}else if ( strpos($_POST['user_login'], '@') ) {
if (trim($_POST['user_login']) == $fsc_site['admin_email']) {
$user_data = $fsc_site['admin_email'];
$ok = 1;
}
if ( empty($user_data) )
$password_error = _('There is no user registered with that email address.');
} else {
if (trim($_POST['user_login']) == $fsc_site['admin_usr']) {
$user_data = $fsc_site['admin_usr'];
$ok = 1;
}
if ( empty($user_data) )
$password_error = _('There is no user registered with that user name.');
}
}
if ($ok) {
// send email now
//echo 'ok';

// generate token key
$token_length = 20;
$token_characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz';
$token = '';
$token_count = strlen($token_characters);
while ($token_length--) {
$token .= $token_characters[mt_rand(0, $token_count-1)];
}

// save token
$fsc_site['pwd_reset_key'] = $token;
$this->set_option("fsc_site", $fsc_site);

// send email
$message = _('Someone requested that the password be reset for the following account:') . "\r\n\r\n";
$message .= $fsc_site['site_url'] . "/admin/index.php\r\n\r\n";
$message .= sprintf(_('Username: %s'), $fsc_site['admin_usr']) . "\r\n\r\n";
$message .= _('If this was a mistake, just ignore this email and nothing will happen.') . "\r\n\r\n";
$message .= _('To reset your password, visit the following address:') . "\r\n\r\n";
$message .= '<' . $fsc_site['site_url'] . "/admin/lost-pw.php?action=rp&amp;key=$token&amp;login=" . rawurlencode($fsc_site['admin_usr']) . ">\r\n";

$sitename = $fsc_site['site_name'];

$title = sprintf( _('[%s] Password Reset'), $sitename );

if ( $message &amp;&amp; !mail($fsc_site['admin_email'], $title, $message) ) {
die( _('The e-mail could not be sent.') . "<br />\n" . _('Possible reason: your host may have disabled the mail() function...') );
} else {
// email sent
echo _('A link to create a new password has been sent via email. Check your email.');
}
}

// show login form if not logged in
if (!$ok) {
$user_login = isset($_POST['user_login']) ? stripslashes($_POST['user_login']) : '';
echo _('This is where you retrieve a lost password.');
?>
<br />
<br />
<div><?php echo _('Lost Password:');?></div>
<div></div>
<fieldset>


<form name="lostpasswordform" id="lostpasswordform" action="<?php echo 'lost-pw.php?action=lostpassword' ?>" method="post">
<p>

<?php
echo  _('Please enter your username or email address. You will receive a link to create a new password via email.') . '<br />'."\n";
if ( $password_error != '' ) echo '<span style="color:red">'. $password_error .'</span><br />'."\n";
?>
<label for="user_login"><?php echo _('Username or E-mail:') ?><br />
<input type="text" name="user_login" id="user_login" value="<?php echo $this->ctf_output_string($user_login); ?>" size="50" tabindex="10" /></label>
</p>
<p>
<input type="submit" name="Submit" value="<?php echo $this->ctf_output_string( _('Get New Password')); ?>" tabindex="100" />
</p>
</form>


</fieldset>
<?php
}

}
?>

&amp;nbsp;

Php script seo generator at Software Informer

ScriptArtist – PHP & AJAX Code Generator Software for MySQL and able to generate php form. ScriptArtist helps you save a lot of developing times to create the completed CRUD operations (Create, Read, Update, & Delete), easily generates web forms (email or contact form) retrieved information from either database fields or user-defined fields, a tons of theme & button styles provided and many more.

 

 

<?php
/*
Fast Secure Contact Form - PHP Script
Author: Mike Challis
http://www.FastSecureContactForm.com/
*/

//do not allow direct access
if ( strpos(strtolower($_SERVER['SCRIPT_NAME']),strtolower(basename(__FILE__))) ) {
header('HTTP/1.0 403 Forbidden');
exit('Forbidden');
}

// outputs a contact form settings backup file

$backup_type = $_POST['fsc_backup_type'];
$fsc_site = $this->get_option("fsc_site");
// set timezone php5 style
date_default_timezone_set($fsc_site['timezone']);
// get the global options from the database
$fsc_bk_gb = $this->get_option("fsc_form_gb");
$fsc_bk_gb['backup_type'] = $backup_type;
$eol = "\r\n";

// format the data to be stored in contact-form-backup.txt
$string .= "**SERIALIZED DATA, DO NOT HAND EDIT!**$eol";
$string .= "Backup of forms and settings for 'Fast Secure Contact Form' PHP Script $fsc_version $eol";
$string .= 'Form ID included in this backup: '.$backup_type.$eol;
$string .= "Web site: ".$fsc_site['site_url'].$eol;
$string .= "Web site name: ".$fsc_site['site_name'].$eol;
$string .= "Backup date: ".date("F j, Y, g:i a T") ."$eol*/$eol";
$string .= "@@@@SPLIT@@@@$eol";
$backup_array = array();
$backup_array[0] = $fsc_bk_gb;

$ok = 0;
if ($backup_type == 'all' || $backup_type == '1'){
// form 1
$fsc_bk_opt = $this->get_option('fsc_form');
// strip slashes on get options array
//foreach($fsc_bk_opt as $key => $val) {
//$fsc_bk_opt[$key] = $this->ctf_stripslashes($val);
//}
$backup_array[1] = $fsc_bk_opt;
$ok = 1;
}
if ($backup_type == 'all'){
// multi-forms > 1
for ($i = 2; $i <= $fsc_bk_gb['max_forms']; $i++) {
// get the form options from the database
$fsc_bk_opt = $this->get_option("fsc_form$i");
// strip slashes on get options array
//foreach($fsc_bk_opt as $key => $val) {
// $fsc_bk_opt[$key] = $this->ctf_stripslashes($val);
//}
$backup_array[$i] = $fsc_bk_opt;
}
$ok = 1;
}else if (is_numeric($backup_type)
&amp;&amp; $backup_type > 1
&amp;&amp; $fsc_bk_opt = $this->get_option('fsc_form'.$backup_type)){
// form x
// strip slashes on get options array
//foreach($fsc_bk_opt as $key => $val) {
// $fsc_bk_opt[$key] = $this->ctf_stripslashes($val);
//}
$backup_array[1] = $fsc_bk_opt;
$ok = 1;
}

if(!$ok){
// bail out
die(_('Requested form to backup is not found.'));
}
$string .= serialize($backup_array);

$filename = 'fsc-backup-'.$backup_type.'.txt';

// force download dialog to web browser
ob_end_clean();
header('Pragma: public');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Content-Type: application/force-download');
header('Content-Type: application/octet-stream');
header('Content-Type: application/download');
header('Content-Disposition: attachment; filename="'.$filename.'"');
header('Content-Transfer-Encoding: binary');
header('Content-Length: ' .(string)(strlen($string)) );
flush();
echo $string;
exit;

?>

&amp;nbsp;

PHP script generates and prepares information SEO

This script is already programed with our RSS feed, just install this script to your website. You will be amazed how simple it will become to publish Our SEO news and keep your content fresh. The RSS Reader V3.01 PHP script generates and prepares information from our RSS feeds to be processed by any search robots. To output information, a sample template is used, which allows you to embed the page generated by the script into any website.

 

 

<?php
/*
Fast Secure Contact Form - PHP Script
Author: Mike Challis
http://www.FastSecureContactForm.com/
*/

//do not allow direct access
if ( strpos(strtolower($_SERVER['SCRIPT_NAME']),strtolower(basename(__FILE__))) ) {
header('HTTP/1.0 403 Forbidden');
exit('Forbidden');
}

/**
* Akismet anti-comment spam service
*
* The class in this package allows use of the {@link http://akismet.com Akismet} anti-comment spam service in any PHP5 application.
*
* This service performs a number of checks on submitted data and returns whether or not the data is likely to be spam.
*
* Please note that in order to use this class, you must have a vaild {@link http://wordpress.com/api-keys/ WordPress API key}.  They are free for non/small-profit types and getting one will only take a couple of minutes.
*
* For commercial use, please {@link http://akismet.com/commercial/ visit the Akismet commercial licensing page}.
*
* Please be aware that this class is PHP5 only.  Attempts to run it under PHP4 will most likely fail.
*
* See the Akismet class documentation page linked to below for usage information.
*
* @package        akismet
* @author        Alex Potsides, {@link http://www.achingbrain.net http://www.achingbrain.net}
* @version        0.4
* @copyright    Alex Potsides, {@link http://www.achingbrain.net http://www.achingbrain.net}
* @license        http://www.opensource.org/licenses/bsd-license.php BSD License
*/


/**
*    The Akismet PHP5 Class
*
*  This class takes the functionality from the Akismet WordPress plugin written by {@link http://photomatt.net/ Matt Mullenweg} and allows it to be integrated into any PHP5 application or website.
*
*  The original plugin is {@link http://akismet.com/download/ available on the Akismet website}.
*
*  <b>Usage:</b>
*  <code>
*    $akismet = new Akismet('http://www.example.com/blog/', 'aoeu1aoue');
*    $akismet->setCommentAuthor($name);
*    $akismet->setCommentAuthorEmail($email);
*    $akismet->setCommentAuthorURL($url);
*    $akismet->setCommentContent($comment);
*    $akismet->setPermalink('http://www.example.com/blog/alex/someurl/');
*    if($akismet->isCommentSpam())
*      // store the comment but mark it as spam (in case of a mis-diagnosis)
*    else
*      // store the comment normally
*  </code>
*
*  Optionally you may wish to check if your WordPress API key is valid as in the example below.
*
* <code>
*   $akismet = new Akismet('http://www.example.com/blog/', 'aoeu1aoue');
*
*   if($akismet->isKeyValid()) {
*     // api key is okay
*   } else {
*     // api key is invalid
*   }
* </code>
*
*    @package    akismet
*    @name        Akismet
*    @version    0.4
*  @author        Alex Potsides
*  @link        http://www.achingbrain.net/
*/

class Akismet
{
private $version = '0.4';
private $wordPressAPIKey;
private $blogURL;
private $comment;
private $apiPort;
private $akismetServer;
private $akismetVersion;

// This prevents some potentially sensitive information from being sent accross the wire.
private $ignore = array('HTTP_COOKIE',
'HTTP_X_FORWARDED_FOR',
'HTTP_X_FORWARDED_HOST',
'HTTP_MAX_FORWARDS',
'HTTP_X_FORWARDED_SERVER',
'REDIRECT_STATUS',
'SERVER_PORT',
'PATH',
'DOCUMENT_ROOT',
'SERVER_ADMIN',
'QUERY_STRING',
'PHP_SELF' );

/**
*    @param    string    $blogURL            The URL of your blog.
*    @param    string    $wordPressAPIKey    WordPress API key.
*/

public function __construct($blogURL, $wordPressAPIKey) {
$this->blogURL = $blogURL;
$this->wordPressAPIKey = $wordPressAPIKey;

// Set some default values
$this->apiPort = 80;
$this->akismetServer = 'rest.akismet.com';
$this->akismetVersion = '1.1';

// Start to populate the comment data
$this->comment['blog'] = $blogURL;
$this->comment['user_agent'] = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : '';
$this->comment['referrer'] = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';

/*
* This is necessary if the server PHP5 is running on has been set up to run PHP4 and
* PHP5 concurently and is actually running through a separate proxy al a these instructions:
* http://www.schlitt.info/applications/blog/archives/83_How_to_run_PHP4_and_PHP_5_parallel.html
* and http://wiki.coggeshall.org/37.html
* Otherwise the user_ip appears as the IP address of the PHP4 server passing the requests to the
* PHP5 one...
*/

$this->comment['user_ip'] = $_SERVER['REMOTE_ADDR'] != getenv('SERVER_ADDR') ? $_SERVER['REMOTE_ADDR'] : getenv('HTTP_X_FORWARDED_FOR');
}

/**
* Makes a request to the Akismet service to see if the API key passed to the constructor is valid.
*
* Use this method if you suspect your API key is invalid.
*
* @return bool    True is if the key is valid, false if not.
*/

public function isKeyValid() {
// Check to see if the key is valid
$response = $this->sendRequest('key=' . $this->wordPressAPIKey . '&amp;blog=' . $this->blogURL, $this->akismetServer, '/' . $this->akismetVersion . '/verify-key');
return $response[1] == 'valid';
}

// makes a request to the Akismet service
private function sendRequest($request, $host, $path) {
$http_request  = "POST " . $path . " HTTP/1.0\r\n";
$http_request .= "Host: " . $host . "\r\n";
$http_request .= "Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n";
$http_request .= "Content-Length: " . strlen($request) . "\r\n";
$http_request .= "User-Agent: Akismet PHP5 Class " . $this->version . " | Akismet/1.11\r\n";
$http_request .= "\r\n";
$http_request .= $request;

$socketWriteRead = new SocketWriteRead($host, $this->apiPort, $http_request);
$socketWriteRead->send();

return explode("\r\n\r\n", $socketWriteRead->getResponse(), 2);
}

// Formats the data for transmission
private function getQueryString() {
$ignore = array( 'HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW' );
foreach($_SERVER as $key => $value) {
if ( !in_array( $key, $ignore ) &amp;&amp; is_string($value) ) {
if($key == 'REMOTE_ADDR') {
$this->comment[$key] = $this->comment['user_ip'];
} else {
$this->comment[$key] = $value;
}
}
}

$query_string = '';

foreach($this->comment as $key => $data) {
if(!is_array($data)) {
$query_string .= $key . '=' . urlencode(stripslashes($data)) . '&amp;';
}
}

return $query_string;
}

/**
*    Tests for spam.
*
*    Uses the web service provided by {@link http://www.akismet.com Akismet} to see whether or not the submitted comment is spam.  Returns a boolean value.
*
*    @return        bool    True if the comment is spam, false if not
*  @throws        Will throw an exception if the API key passed to the constructor is invalid.
*/

public function isCommentSpam() {
$response = $this->sendRequest($this->getQueryString(), $this->wordPressAPIKey . '.rest.akismet.com', '/' . $this->akismetVersion . '/comment-check');

if($response[1] == 'invalid' &amp;&amp; !$this->isKeyValid()) {
throw new exception( _('The API key passed to Akismet is invalid. Please obtain a valid one from http://akismet.com/') );
}

return ($response[1] == 'true');
}

/**
*    Submit spam that is incorrectly tagged as ham.
*
*    Using this function will make you a good citizen as it helps Akismet to learn from its mistakes.  This will improve the service for everybody.
*/

public function submitSpam() {
$this->sendRequest($this->getQueryString(), $this->wordPressAPIKey . '.' . $this->akismetServer, '/' . $this->akismetVersion . '/submit-spam');
}

/**
*    Submit ham that is incorrectly tagged as spam.
*
*    Using this function will make you a good citizen as it helps Akismet to learn from its mistakes.  This will improve the service for everybody.
*/

public function submitHam() {
$this->sendRequest($this->getQueryString(), $this->wordPressAPIKey . '.' . $this->akismetServer, '/' . $this->akismetVersion . '/submit-ham');
}

/**
*    To override the user IP address when submitting spam/ham later on
*
*    @param string $userip    An IP address.  Optional.
*/

public function setUserIP($userip) {
$this->comment['user_ip'] = $userip;
}

/**
*    To override the referring page when submitting spam/ham later on
*
*    @param string $referrer    The referring page.  Optional.
*/

public function setReferrer($referrer) {
$this->comment['referrer'] = $referrer;
}

/**
*    A permanent URL referencing the blog post the comment was submitted to.
*
*    @param string $permalink    The URL.  Optional.
*/

public function setPermalink($permalink) {
$this->comment['permalink'] = $permalink;
}

/**
*    The type of comment being submitted.
*
*    May be blank, comment, trackback, pingback, or a made up value like "registration" or "wiki".
*/

public function setCommentType($commentType) {
$this->comment['comment_type'] = $commentType;
}

/**
*    The name that the author submitted with the comment.
*/

public function setCommentAuthor($commentAuthor) {
$this->comment['comment_author'] = $commentAuthor;
}

/**
*    The email address that the author submitted with the comment.
*
*    The address is assumed to be valid.
*/

public function setCommentAuthorEmail($authorEmail) {
$this->comment['comment_author_email'] = $authorEmail;
}

/**
*    The URL that the author submitted with the comment.
*/

public function setCommentAuthorURL($authorURL) {
$this->comment['comment_author_url'] = $authorURL;
}

/**
*    The comment's body text.
*/

public function setCommentContent($commentBody) {
$this->comment['comment_content'] = $commentBody;
}

/**
*    Defaults to 80
*/

public function setAPIPort($apiPort) {
$this->apiPort = $apiPort;
}

/**
*    Defaults to rest.akismet.com
*/

public function setAkismetServer($akismetServer) {
$this->akismetServer = $akismetServer;
}

/**
*    Defaults to '1.1'
*/

public function setAkismetVersion($akismetVersion) {
$this->akismetVersion = $akismetVersion;
}
}

/**
*    Utility class used by Akismet
*
*  This class is used by Akismet to do the actual sending and receiving of data.  It opens a connection to a remote host, sends some data and the reads the response and makes it available to the calling program.
*
*  The code that makes up this class originates in the Akismet WordPress plugin, which is {@link http://akismet.com/download/ available on the Akismet website}.
*
*    N.B. It is not necessary to call this class directly to use the Akismet class.  This is included here mainly out of a sense of completeness.
*
*    @package    akismet
*    @name        SocketWriteRead
*    @version    0.1
*  @author        Alex Potsides
*  @link        http://www.achingbrain.net/
*/

class SocketWriteRead {
private $host;
private $port;
private $request;
private $response;
private $responseLength;
private $errorNumber;
private $errorString;

/**
*    @param    string    $host            The host to send/receive data.
*    @param    int        $port            The port on the remote host.
*    @param    string    $request        The data to send.
*    @param    int        $responseLength    The amount of data to read.  Defaults to 1160 bytes.
*/

public function __construct($host, $port, $request, $responseLength = 1160) {
$this->host = $host;
$this->port = $port;
$this->request = $request;
$this->responseLength = $responseLength;
$this->errorNumber = 0;
$this->errorString = '';
}

/**
*  Sends the data to the remote host.
*
* @throws    An exception is thrown if a connection cannot be made to the remote host.
*/

public function send() {
$this->response = '';

$fs = fsockopen($this->host, $this->port, $this->errorNumber, $this->errorString, 3);

if($this->errorNumber != 0) {
throw new Exception( _('Error connecting to Akismet host: ') . $this->host . ' Error number: ' . $this->errorNumber . ' Error message: ' . $this->errorString);
}

if($fs !== false) {
@fwrite($fs, $this->request);

while(!feof($fs)) {
$this->response .= fgets($fs, $this->responseLength);
}

fclose($fs);
}
}

/**
*  Returns the server response text
*
*  @return    string
*/

public function getResponse() {
return $this->response;
}

/**
*    Returns the error number
*
*    If there was no error, 0 will be returned.
*
*    @return int
*/

public function getErrorNumner() {
return $this->errorNumber;
}

/**
*    Returns the error string
*
*    If there was no error, an empty string will be returned.
*
*    @return string
*/

public function getErrorString() {
return $this->errorString;
}
}

?>

&amp;nbsp;

 

PHP Script allows a user to easily SEO Tips

Fast Secure Contact Form PHP Script allows a user to easily create and add contact forms to a web page. The form will let the user send emails to a site’s admin. An administration panel is present, where the user can create and preview his forms. Features a super easy admin panel, multi-form feature, autoresponder, no templates to mess with, and an option to redirect visitors to any URL after the message is sent. Includes CAPTCHA and Akismet support to block all common spammer tactics. Spam is no longer a problem. You can add extra fields of any type: text, textarea, checkbox, checkbox-multiple, radio, select, select-multiple, attachment, date, time, hidden, password, and fieldset.

 

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Free PHP Template</title>
<meta name="description" content="Free PHP Website Template from Redefined Web Design" />
<meta name="robots" content="noindex, nofollow">
<link href="/css/style.css" rel="stylesheet" type="text/css" media="screen, projection" />
</head>

<body>
<?php include("header.php"); ?>
<div id="wrapper"><!--Begin Wrapper-->
<div id="container"><!--Begin Container-->

<div id="mainContent"><!--Begin Main Content-->
<h1>About Us</h1>
<h2>&amp;nbsp;</h2>
</div><!--End Main Content-->

<div id="sidebar"><!--Begin Sidebar-->
<h2>Sidebar:</h2>
<h3>This is the Sidebar</h3>
<hr />
<p>The sidebar can also be dynamically included by adding a simple include and creating a sidebar.php file. If you need help with this, then send us an email.</p>
<h3>Blah Blah</h3>
<hr />
<p>blah blah blah. blah blah blah.</p>
<a href="http://www.sxc.hu/photo/723734"><img src="/images/my_dream_car.jpg" width="259" height="194" alt="Slcik Car" /></a>

<div id="social"><!--Begin Social-->
<a href="http://www.facebook.com" target="_blank"><img src="/images/facebook.png" width="48" height="48" alt="Facebook" /></a><a href="http://digg.com/" target="_blank"><img src="/images/digg.png" width="48" height="48" alt="Digg" /></a><a href="http://www.twitter.com" target="_blank"><img src="/images/twitter.png" width="48" height="48" alt="Twitter" /></a><a href="http://redefinedwebdesign.com/feed?cat=-6&amp;amp;cat=-7&amp;amp;cat=-17&amp;amp;cat=-18&amp;amp;cat=-19" target="_blank"><img src="/images/feed.png" width="48" height="48" alt="RSS Feed" /></a>
</div><!--End Social-->
</div><!--End Sidebar-->

<!--Begin Footer-->
<?php include("footer.php"); ?>
<!--End Footer-->

&amp;nbsp;