Hi I have this textfile I need to get information from.
I use fopen and fread. the textfile contains 2 rows. I need the second row only. The problem is if I go to the page I get no info in the second row. the page redirects to another page. If i go back and refresh I have the 2nd row all of a sudden. Can nyone figure out what I do wrong?
/Johan
$pw="xxx";
$usrid="yyy";
$strReceiptCode = $GET['ReceiptCode'];
$AcceptCancel = $GET['AcceptCancel'];
$Identifier = $GET['Identifier'];
$Name = $GET['Name'];
$queryString="http://www.ecommercemalta.com/EPG/QUERY?Receipts=".$strReceiptCode."&Login_Name=".$usrid."&Login_Password=".$pw;
$fp = fopen ($queryString, "rb");
$text=fread($fp,5000);
$text=str_replace("Receipt,Identifier,Amount,Auth,FraudCode,ReasonCode,Status,Batch","",$text);
$text=trim($text);
fclose ($fp);
$textToVector=explode(",",$text);
$VReceipt=$textToVector[0];
$VIdentifier=$textToVector[1];
$VAmount=$textToVector[2];
$VStatus=$textToVector[6];
$sendVars="order_end_cont.asp?AcceptCancel=".$AcceptCancel."&ReceiptCode=".$VReceipt."&Identifier=".$VIdentifier."&Amount=".$VAmount."&Status=".$VStatus;