session_start(); ?>
= $i){
$i = $offset;
$result[] = $offset;
}
}
}
$firstdot= $result[0];
$seconddot= $result[1];
$thirddot=$result[2];
$part1=substr ( $ip, 0, $firstdot);
$part2=substr ( $ip, $firstdot+1, $seconddot-$firstdot-1);
$part3=substr ( $ip, $seconddot+1, $thirddot-$seconddot-1);
$part4=substr ( $ip, $thirddot+1, 3);
$decimalip= $part1*16777216+$part2*65536+$part3*256+$part4;
$sql = "SELECT * FROM `iplist` WHERE `ipfrom` <= $decimalip and `ipto` >= $decimalip";
$countrylist = mysql_query($sql) or die("$sql");
$hits=mysql_num_rows ($countrylist);
$retval="Unknown";
if($hits>0){
$row = mysql_fetch_assoc($countrylist);
$retval=$row['country'];
}
// echo ("hits: ".$hits." IP: ".$ip." Decimal IP: ".$decimalip." Retval: ".$retval);
$_SESSION['country']=$retval;
$rawkeyword_string = $_GET['searchval']; // In case the search value is passed between pages
$referertext=$_SERVER['HTTP_REFERER'];
$_SESSION['refererstring']=$referertext;
$parsed_url=parse_url($referertext);
$querystring=$parsed_url;
$googleresult=strpos($parsed_url['host'],'google');
$yahooresult=strpos($parsed_url['host'],'yahoo');
$bingresult=strpos($parsed_url['host'],'bing');
$AOLresult=strpos($parsed_url['host'],'aol');
$askresult=strpos($parsed_url['host'],'ask.com');
$dogpileresult=strpos($parsed_url['host'],'dogpile.com');
if($googleresult !== false):
parse_str($parsed_url['query'],$parsed_query_string);
$rawkeyword_string=$parsed_query_string['q'].'[G]';
$_SESSION['keyword']=$rawkeyword_string;
$_SESSION['engine']="Google";
elseif($yahooresult !== false):
parse_str($parsed_url['query'],$parsed_query_string);
$rawkeyword_string=$parsed_query_string['p'].'[Y]';
$_SESSION['keyword']=$rawkeyword_string;
$_SESSION['engine']="Yahoo";
elseif($bingresult !== false):
parse_str($parsed_url['query'],$parsed_query_string);
$rawkeyword_string=$parsed_query_string['q'].'[B]';
$_SESSION['keyword']=$rawkeyword_string;
$_SESSION['engine']="Bing";
elseif($AOLresult !== false):
parse_str($parsed_url['query'],$parsed_query_string);
$rawkeyword_string=$parsed_query_string['query'].'[AOL]';
$_SESSION['keyword']=$rawkeyword_string;
$_SESSION['engine']="AOL";
elseif($askresult !== false):
parse_str($parsed_url['query'],$parsed_query_string);
$rawkeyword_string=$parsed_query_string['q'].'[Ask]';
$_SESSION['keyword']=$rawkeyword_string;
$_SESSION['engine']="Ask.com";
else:
$_SESSION['engine']="None";
$_SESSION['keyword']="None";
$destination="Landed";
endif;
} // Session variables are now defined
$keyword_string=rawurlencode($_SESSION['keyword']);
// Write to Database
$db = MYSQL_CONNECT($roothostname,$rootusername, $rootpassword) OR DIE("Unable to connect to database");
$db1 = mysql_select_db($dbName, $db) or die ("Couldn't select database.");
$time = date("Y-m-d H:i:s");
$justdate = date("Y-m-d");
$pagename="/student_cards";
$ip=$_SESSION['hostip'];
$kw=$_SESSION['keyword'];
$country=$_SESSION['country'];
$engine=$_SESSION['engine'];
$thissession=session_id();
$qry="INSERT INTO `clicks` (`date_clicked` , `justdate`, `ip_address` , `page`, `keyword`,`engine`,`session`, `dest_url`, `country`) VALUES ('$time', '$justdate','$ip' , '$pagename' , '$kw', '$engine', '$thissession', '$destination', '$country');";
mysql_query($qry) or die("something went wrong");
$linkbase="';
// External links
$smartcreditlink=$linkbase."Smart%20Credit%20with%20Free%20Trial&searchval=".$keyword_string."'>";
$advantalink=$linkbase."Advanta%20Platinum%20Credit%20Card&searchval=".$keyword_string."'>";
$businessworldlink=$linkbase."Advanta%20Business%20World%20MasterCard&searchval=".$keyword_string."'>";
// These have no keyword subid yet Use the carat to omit keyword
$linkbase="";
$monogramlinktop=$linkbase."Discover%20Student%20Card%20-%20Monogram&searchval=".$keyword_string."'>";
$studentlinktop=$linkbase."The%20Discover%20Student%20Card&searchval=".$keyword_string."'>";
$clearlinktop=$linkbase."Discover%20Student%20Card%20Clear&searchval=".$keyword_string."'>";
$privacymatterslink=$linkbase."Privacy%20Matters&searchval=".$keyword_string."'>";
?>
Student Credit Cards - Search and Apply for Student Cards at CreditScoreQuick.com
Featured Offer Discover® Student Card Tropical Beach
Up to 5% cashback bonus.
Make your money worth Moresm*
Unlimited cash rewards, automatically
5% to 20% cashback bonus at top retailers through our exclusive online shopping site
Turn your cashback bonus into bigger rewards every time you redeem for gift cards from over 100 brand-name partners
Build credit history – We report to all 3 major credit bureaus
Apply online for your Discover® Student Card - Tropical Beach
Student Credit Cards develop a good credit history.Responsible credit card management that builds a strong credit score.
";
foreach($params as $items){
foreach($items as $key=>$item){
$thisitem=$key;
switch ($thisitem) {
case "NAME":
$thisoffer=$item;
break;
case "ID":
$thisid=$item;
$linkbase="../offer.php?offerid=";
$thisurl=$linkbase.$thisid."&searchval=".$keyword_string;
break;
case "BULLET":
$bullet0=$item;
break;
case "BULLET1":
$bullet1=$item;
break;
case "BULLET2":
$bullet2=$item;
break;
case "BULLET3":
$bullet3=$item;
break;
case "BULLET4":
$bullet4=$item;
break;
case "BULLET5":
$bullet5=$item;
break;
case "BULLET6":
$bullet6=$item;
break;
case "IMAGE-RG":
$cardimage=$item;
break;
case "INTRO-APR-DISPLAY":
$introapr=$item;
break;
case "INTRO-APR-PERIOD-DISPLAY":
$introaprperiod=$item;
break;
case "ANNUAL-FEE-DISPLAY":
$annualfee=$item;
break;
default:
break;
}
}
?>