Featured Offer
Public Savings Secured Visa® Credit Card
- 0% APR for purchases for 6 months
- No annual or recurring monthly fees
- Your credit rating is not a factor!
- Reports to ALL 3 BUREAUS
Apply for your Public Savings Secured Visa® Credit Card Here!
|
Credit cards for a variety of credit types; delinquency, default, and bankruptcy.
Elapsed: ".$elapsed;
if($elapsed>=24){
$rawfile="http://www.credit.com/creditcards_xml_api/v3?af=p44532&ag=none&xpath=credit-scores/credit-score='No%20Credit'";
$newfile = "/home/httpd/vhosts/creditscorequick.com/httpdocs/credit_cards/subprime_credit_cards.xml";
$handle=fopen($newfile,"w+");
$ch = curl_init($rawfile);
curl_setopt($ch, CURLOPT_URL,$rawfile);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FILE,$handle);
$output = curl_exec($ch);
fclose($handle);
// Update Database
include("../db/dataconf.php");
$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.");
$file = "subprime_credit_cards.xml";
$xml_parser = xml_parser_create();
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
$data = fread($fp, filesize($file));
fclose($fp);
xml_parse_into_struct($xml_parser, $data, $vals, $index);
xml_parser_free($xml_parser);
$params = array();
$curid = 0;
$curlink="";
$thisid="" ;
$thisurl="" ;
foreach ($vals as $xml_elem) {
if ($xml_elem['type'] == 'complete') {
if($xml_elem['tag'] == "ID"){
$curid++;
}
$tag = $xml_elem['tag'];
if($tag=="BULLET"){
if(!array_key_exists("BULLET",$params[$curid])){
$params[$curid]["BULLET"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET1",$params[$curid])){
$params[$curid]["BULLET1"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET2",$params[$curid])){
$params[$curid]["BULLET2"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET3",$params[$curid])){
$params[$curid]["BULLET3"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET4",$params[$curid])){
$params[$curid]["BULLET4"] =$xml_elem['value'];
}
}else{
$params[$curid][$tag] =$xml_elem['value'];
}
}
}
// for displaying the parsed contents in good format.
foreach($params as $items){
$thisitem=$items;
foreach($items as $key=>$item){
$thisitem=$key;
switch ($thisitem) {
case "ID":
$thisid=$item;
break;
case "LINK":
$thisurl=$item;
break;
default:
break;
} //switch
if ($thisid != "" AND $thisurl != "") {
$sqltext="SELECT * FROM links WHERE `description` LIKE '".$thisid."'";
$result=mysql_query($sqltext);
$num_rows = mysql_num_rows($result);
$thisurl=substr($thisurl,0,-4);
$time = date("Y-m-d H:i:s");
if ($num_rows==0){
$qry= "INSERT INTO `links` (`offer_id`, `description`, `URL`, `appendable`, `updated`) VALUES (NULL, '$thisid', '$thisurl', 1,'$time');";
mysql_query($qry) or die("Unable to Add New Card");
}else{
$sql = 'UPDATE `links` SET `URL` = "'.$thisurl.'" WHERE `description` = "'.$thisid.'" LIMIT 1;';
$sql = 'UPDATE `links` SET `updated` = "'.$time.'" WHERE `description` = "'.$thisid.'" LIMIT 1;';
mysql_query($sql) or die("Unable to Update");
} //else numrows 0
$thisid="" ;
$thisurl="" ;
} // endif if thisid and url populated
} //foreach items
} // foreach param
} // EndIf update needed.
// File is up-to-date. Begin
$file = "subprime_credit_cards.xml";
$xml_parser = xml_parser_create();
if (!($fp = fopen($file, "r"))) {
die("could not open XML input");
}
$data = fread($fp, filesize($file));
fclose($fp);
xml_parse_into_struct($xml_parser, $data, $vals, $index);
xml_parser_free($xml_parser);
$params = array();
$curid = 0;
foreach ($vals as $xml_elem) {
if ($xml_elem['type'] == 'complete') {
if($xml_elem['tag'] == "ID"){
$curid++;
}
$tag = $xml_elem['tag'];
if($tag=="BULLET"){
if(!array_key_exists("BULLET",$params[$curid])){
$params[$curid]["BULLET"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET1",$params[$curid])){
$params[$curid]["BULLET1"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET2",$params[$curid])){
$params[$curid]["BULLET2"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET3",$params[$curid])){
$params[$curid]["BULLET3"] =$xml_elem['value'];
}else if(!array_key_exists("BULLET4",$params[$curid])){
$params[$curid]["BULLET4"] =$xml_elem['value'];
}
}else{
$params[$curid][$tag] =$xml_elem['value'];
}
}
}
$bullet0="";
$bullet1="";
$bullet2="";
$bullet3="";
$bullet4="";
$bullet5="";
$bullet6="";
// for displaying the parsed contents in good format.
echo "";
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;
}
}
?>
|
echo ''.$thisoffer.' ';
echo ''.$bullet0.'';
echo ''.$bullet1.'';
echo ''.$bullet2.'';
if ($bullet3<>""){
echo ''.$bullet3.'';
}
if ($bullet4<>""){
echo ''.$bullet4.'';
}
if ($bullet5<>""){
echo ''.$bullet5.'';
}
if ($bullet6<>""){
echo ''.$bullet6.'';
}
echo '
Intro APR: '.$introapr.' Intro Period: '.$introaprperiod.' Annual fee: '.$annualfee.'
' ;
echo 'Apply Now for your '.$thisoffer.'';
echo '
| ';
echo ' ';
$bullet0="";
$bullet1="";
$bullet2="";
$bullet3="";
$bullet4="";
$bullet5="";
$bullet6="";
}
?>
|