The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “CPA

PHP / Image Verification

JohnW

New Member
affiliate
Hi Guys

I have been trying to work on this but with no sucess. If anyone could help that would be great.

I'm trying to install

PHP:
<?php
    session_start();

    if ($_POST) {
        if($validate==$_SESSION['code']){
            echo("Correct code entered. <br />");
        } else {
            echo("Incorrect code entered. <br />");
        }
    }
?>
into

PHP:
<?

include("config.php");
if (strstr($_SERVER['HTTP_REFERER'], $root));
else { header ("Location: $rooturl"); }

$ip = $_SERVER['REMOTE_ADDR'];
$url = $_POST['url'];

if(preg_match('|^http(s)?://[a-z0-9-]+(\.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url))
{

$query = "INSERT INTO $table (ip,url) VALUES ('$ip','$url')" or die('MySQL error: '.mysql_error());
mysql_query($query);
$qs = mysql_insert_id();
$link = $destination . $qs;
require 'create_template.php';

} else {
echo 'Your URL is invalid';

}
?>

Now I'm ok doing the HTML side but not the PHP... still learning.

Thanks
John W
 
banners
Back