PHP - Help Urgently Need To Know Something
Hi guys, I am not a coder, but more a graphic designer and I am currently designing a ccbill affiliate program in which I urgently need to find a way to code the following:
When people visit the affiliate page, affiliates are able to log in by entering their 6 digit ccbill affiliate ID. Once they log in, they are redirected to the affiliate area, where all affiliate links are embedded with their unique ID. I have seen many affiliate sites using this simple "set cookie" script but for the life of me, can I find it online!! .. absolutly no chance. I have been looking for a way to do this for around 6 months now. Here are some examples I found on google of affiliates that are using this type of code: [links to sexually oriented sites removed.] < this is the layout I want to follow, ie three steps at the bottom of the page, with the third being the login It seems they are all using a pho file to do this. Can anyone please, please help me with this, as I think this forum is my last resort after 6 months of searching for a way to do this. Many thanks! Similar TutorialsHi Guys, I am a bit of a PHP noob and I am hoping for a bit of help. My deadline to have this working is tomorrow. Basically I want to display a table which shows all the events I have signed upto. However, my code is creating windows within itself and separate tables which are all over the place. Here is my code: <?php session_start(); $email = $_SESSION['email']; include '../dbconn.php'; include '../includes/functions2.php'; $query2 = "SELECT * FROM billing where email='$email'"; $result2 = mysql_query($query2); $num_rows = mysql_num_rows($result2); while($row2 = mysql_fetch_array($result2, MYSQL_ASSOC)) { $query3 = "SELECT * FROM events where id='$row2[eventid]'"; $result3 = mysql_query($query3); while($row3 = mysql_fetch_array($result3, MYSQL_ASSOC)) { ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="shortcut icon" href="../images/favicon.ico"> <meta http-equiv="Content-Type" content="text/html; charset=iso8859-1" /> <meta name="keywords" content="Ghost Hunts, Ghost Hunting, Ghost Hunt Suppers, Overnight Ghost Hunt, Haunted Nights, Ghost Hunting Weekends, Paranormal Events, Most Haunted Tours, Most Haunted, Haunted Places, Anyone There?, Fright Nights, Haunted Happenings, Haunted Gatherings, The Hoff, Scott Mills, Yvette Fielding" /> <meta name="description" content=" Paranormal team, organising ghost hunts accross the UK. With many famous guests, only at Anyone There?" /> <link href="style.css" rel="stylesheet" type="text/css" /> <title>Anyone There :. Haunted Experiences</title> </head> <script LANGUAGE="JavaScript" SRC="overlib.js"></script> <body> <div id="container"> <div id="header"> </div> <div id="nav"> <ul> <li><a href="cprotected.php" class="selected" title="Events">My Events</a></li> <li><a href="feedback.php">Feedback</a></li> <li><a href="index.php">Logout</a></li> </ul> </div> <div id="content"> <div id="page"> <h2><?php echo "Welcome $row1[fname] $row1[sname]"; ?></h2> <br> <h2> <?php echo "Showing $num_rows events. . ."; ?> </h2> <center> <p> <?php $deposit=$row2[quantity]*10; $total=$row2[quantity]*$row2[ticketprice]; $cancel='http://www.anyonethere.co.uk/main/cprotected.php'; $paid='http://www.anyonethere.co.uk/main/paid.php'; echo " <center> <table width='800' class='reference'> <tr> <th>Venue</th> <th>Date</th> <th>Total Price</th> <th>Deposit</th> <th>Remaining</th> <th>Ticket Quantity</th> <th>Status</th> </tr> "; if ($row2[status]=='0') { echo "<tr>"; echo "<td>$row3[venue]</td> "; echo "<td>$row3[date]</td> "; echo "<td>£$total</td> "; echo "<td>£$deposit</td> "; echo "<td>£$row2[owe]</td> "; echo "<td>$row2[quantity]</td> "; echo "<td>Pay Deposit</td></tr>"; } elseif ($row2[status]=='1') { echo "<td>$row3[venue]</td> "; echo "<td>$row3[date]</td> "; echo "<td>£$total</td> "; echo "<td>£$deposit</td> "; echo "<td>£$row2[owe]</td> "; echo "<td>$row2[quantity]</td> "; echo "<td bgcolor='orange'>PAY OUTSTANDING BALANCE</td></tr>"; } elseif ($row2[status]=='2') { echo "<td>$row3[venue]</td> "; echo "<td>$row3[date]</td> "; echo "<td>£$total</td> "; echo "<td>£$deposit</td> "; echo "<td>£$row2[owe]</td> "; echo "<td>$row2[quantity]</td> "; echo "<td bgcolor='green'>Paid</td></tr>"; }}} echo "</table>"; ?> </p> </div> <div class="clear"></div> </div> <div id="footer"> <p>© 2011 Anyone The The UK's #1 for Haunted Events</p> </div> </div> </body> </html> Please can somebody give me a pointer in the right direction, it will be a life saver? Thanks in Advance, Dan import java.util.Scanner; public class bijele { public static void main (String[] args) { Scanner in = new Scanner(System.in); int[] neededPieces = {1,1,2,2,2,8}; String[] currentPieces = in.nextLine().split(" "); for (int i = 0; i < 6; i++) { neededPieces[i] -= Integer.parseInt(currentPieces[i]); System.out.print("" + neededPieces[i] + " "); } } }
I have set up my PayPal IPN and it works perfectly when sending test IPN's using the IPN Simulator on the PayPal developer website. When I change the ssl in this line Code: [Select] $fp = fsockopen ('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);to Code: [Select] www.paypal.com It no longer works. It comes back as INVALID, not VERIFIED. Anyone know what the problem could be? My IPN is below. You'll see there is entries into the log table, this is just for testing purposes, and how I found out that it's coming back as INVALID and not VERIFIED. Thanks Denno <?php //connect to the database here include "../scripts/connect_to_mysql.php"; //------------------------------- // PHP 4.1 // read the post from PayPal system and add 'cmd' $req = 'cmd=_notify-validate'; foreach ($_POST as $key => $value) { $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } // post back to PayPal system to validate $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; $fp = fsockopen ('ssl://www.paypal.com', 443, $errno, $errstr, 30); // assign posted variables to local variables $team_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $associated_club = $_POST['custom']; $contact_number = $_POST['invoice']; if (!$fp) { // HTTP ERROR } else { fputs ($fp, $header . $req); while (!feof($fp)) { $res = fgets ($fp, 1024); if (strcmp ($res, "VERIFIED") == 0) { //User code is added below here $dateField=date("Y-m-d H:i:s"); $sqlCommand = "INSERT INTO log VALUES('','$dateField','$payment_status','$payment_amount','$payment_currency','1','0')"; $update = mysql_query($sqlCommand, $myConnection); if($payment_status == "Completed"){ if($payment_amount == '40.00' && $payment_currency == "AUD"){ //process payment and enter information into database $sqlCommand = "INSERT INTO teams VALUES ('','$first_name','$last_name','$associated_club','$team_name','$contact_number','1')"; $update = mysql_query($sqlCommand, $myConnection); } } //User code is added above here } else if (strcmp ($res, "INVALID") == 0) { // log for manual investigation $dateField=date("Y-m-d H:i:s"); $sqlCommand = "INSERT INTO log VALUES('','$dateField','$payment_status','$payment_amount','$payment_currency','0','1')"; $update = mysql_query($sqlCommand, $myConnection); } } fclose ($fp); } echo "$sqlCommand"; ?> I have purchased a ad manager type script and have put so much work in to the site but i cannot get the cron file to execute properly due to errors. The makers of the script arent answering my emails so I am left to find the answer myself im hoping some experts can shine a light on this for me
I have the cron running once daily as required
the error messages are as follows:
/home2/net2you/public_html/2xx.co.uk/include/CronStats.php: line 1: ?php: No such file or directory /home2/net2you/public_html/2xx.co.uk/include/CronStats.php: line 2: syntax error near unexpected token `;' /home2/net2you/public_html/2xx.co.uk/include/CronStats.php: line 2: `ob_start();' I have installed the script on two different hosts and get the exact same errors. any help would be much appriciated the contents of the cron file are below ______________________________________________ <?php |