Help with creating a proper postback script and url
Budget: $10 – $30 CAD
I am looking for a freelancer who can help me with creating a proper postback script and URL for my project. I am using an existing script that needs modification that probably is wrong .m trying to create a functional postback url and script to communicate with cpx research. I have been trying to do this for a very very very long time , I gave up and now im back at it. Here is what I can share of the postback.php script.
<?php
// Get the values from the postback URL parameters
$status = $\_GET\['status'\];
$trans\_id = $\_GET\['trans\_id'\];
$user\_id = $\_GET\['user\_id'\];
$amount\_local = $\_GET\['amount\_local'\];
$amount\_usd = $\_GET\['amount\_usd'\];
$offer\_id = $\_GET\['offer\_id'\];
$ip\_address = $\_GET\['ip\_click'\];
// Validate the data and check for errors
if ($status != "completed" && $status != "pending") {
// Invalid status
die("ERROR: Invalid status");
}
// Perform the actions that you want to do with the data
// Connect to your database using mysqli or PDO
\*\*\*\*MY DATABASE LOGIN INFO\*\*\*\*\*
// Create a mysqli object
$conn = new mysqli($db\_host, $db\_user, $db\_pass, $db\_name);
// Check for connection error
if ($conn->connect\_error) {
die("ERROR: Connection failed: " . $conn->connect\_error);
}
// Prepare and bind an SQL statement to insert or update the data in your table
// Replace the table name and column names with your own
$stmt = $conn->prepare("INSERT INTO offerwall\_history (user\_id, trans\_id, ip\_address, claim\_time, amount) VALUES (?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE claim\_time = ?, amount = ?");
$stmt->bind\_param("ssssis", $user\_id, $trans\_id, $ip\_address, $amount\_usd);
// Execute the prepared statement
if ($stmt->execute() === false) {
// Handle execute error
die("ERROR: Execute failed: (" . $stmt->errno . ") " . $stmt->error);
}
// Close the prepared statement and the connection
$stmt->close();
$conn->close();
// Echo a response that indicates whether the postback was successful or not
echo "OK: Postback received";
Here is what is required from cpx research https://ibb.co/W2bjJRs and with the script i made ( which I am sure is not correct ) I am getting this postback result from cpx https://ibb.co/jzKw985 which shows status 1 in the links but the "status code" box shows 0 the result box is empty. Also nothing is updated in the cloums in my database which you can see here https://ibb.co/nfPfzP4 . .
Specific requirements for the project include:
- Modifying the existing postback script to pass conversion data into database
- Ensuring the script is compatible with the chosen platform or network CPX RESEARCH
- Creating a URL that properly tracks and records the macros
Ideal skills and experience for the job:
- Strong knowledge and experience in postback script development and modification
- Familiarity with the chosen platform or network
- Proficiency in URL tracking and conversion data analysis
-MY SQL DATABASE SKILLS
- Attention to detail and ability to accurately implement script modifications
If you have the necessary skills and experience, please reach out to discuss the project further.
I can pay $10 maximum .
<?php
// Get the values from the postback URL parameters
$status = $\_GET\['status'\];
$trans\_id = $\_GET\['trans\_id'\];
$user\_id = $\_GET\['user\_id'\];
$amount\_local = $\_GET\['amount\_local'\];
$amount\_usd = $\_GET\['amount\_usd'\];
$offer\_id = $\_GET\['offer\_id'\];
$ip\_address = $\_GET\['ip\_click'\];
// Validate the data and check for errors
if ($status != "completed" && $status != "pending") {
// Invalid status
die("ERROR: Invalid status");
}
// Perform the actions that you want to do with the data
// Connect to your database using mysqli or PDO
\*\*\*\*MY DATABASE LOGIN INFO\*\*\*\*\*
// Create a mysqli object
$conn = new mysqli($db\_host, $db\_user, $db\_pass, $db\_name);
// Check for connection error
if ($conn->connect\_error) {
die("ERROR: Connection failed: " . $conn->connect\_error);
}
// Prepare and bind an SQL statement to insert or update the data in your table
// Replace the table name and column names with your own
$stmt = $conn->prepare("INSERT INTO offerwall\_history (user\_id, trans\_id, ip\_address, claim\_time, amount) VALUES (?, ?, ?, ?, ?) ON DUPLICATE KEY UPDATE claim\_time = ?, amount = ?");
$stmt->bind\_param("ssssis", $user\_id, $trans\_id, $ip\_address, $amount\_usd);
// Execute the prepared statement
if ($stmt->execute() === false) {
// Handle execute error
die("ERROR: Execute failed: (" . $stmt->errno . ") " . $stmt->error);
}
// Close the prepared statement and the connection
$stmt->close();
$conn->close();
// Echo a response that indicates whether the postback was successful or not
echo "OK: Postback received";
Here is what is required from cpx research https://ibb.co/W2bjJRs and with the script i made ( which I am sure is not correct ) I am getting this postback result from cpx https://ibb.co/jzKw985 which shows status 1 in the links but the "status code" box shows 0 the result box is empty. Also nothing is updated in the cloums in my database which you can see here https://ibb.co/nfPfzP4 . .
Specific requirements for the project include:
- Modifying the existing postback script to pass conversion data into database
- Ensuring the script is compatible with the chosen platform or network CPX RESEARCH
- Creating a URL that properly tracks and records the macros
Ideal skills and experience for the job:
- Strong knowledge and experience in postback script development and modification
- Familiarity with the chosen platform or network
- Proficiency in URL tracking and conversion data analysis
-MY SQL DATABASE SKILLS
- Attention to detail and ability to accurately implement script modifications
If you have the necessary skills and experience, please reach out to discuss the project further.
I can pay $10 maximum .