updated to new Jinxxy redirect Script

This commit is contained in:
2025-07-19 03:49:11 +02:00
parent 3d44ca99cd
commit c01b52a102
+13 -40
View File
@@ -31,67 +31,40 @@ $productData;
$data = json_decode($_POST["data"]); $data = json_decode($_POST["data"]);
$apolloState = $data->props->pageProps->__APOLLO_STATE__; print_r($data);
$rootData = $data->props->pageProps->__APOLLO_STATE__->ROOT_QUERY;
// getting the product data $product = $data->product;
foreach ($rootData as $key => $value) { $seller = $data->seller;
if (strpos($key, 'product') !== false) {
$temp = $value->__ref;
foreach ($apolloState as $key => $value) {
if (strpos($key, $temp) !== false) {
$productData = $value;
}
}
}
}
// getting the user data
foreach ($apolloState as $key => $value) {
if (strpos($key, $productData->user->__ref) !== false) {
$userData = $value;
}
}
// getting user profilePicture
foreach ($apolloState as $key => $value) {
if (strpos($key, $userData->profile_image->__ref) !== false) {
$creator_pb = $value->url;
}
}
foreach ($apolloState as $key => $value) {
if (strpos($key, $productData->cover->__ref) !== false) {
$content_image = $value->url;
}
}
// set creator name // set creator name
$creator_name = $userData->name; $creator_name = $seller->name;
// set creator jinxxy url // set creator jinxxy url
$creator_jinxxyURL = "https://jinxxy.com/" . $userData->username; $creator_jinxxyURL = $seller->url;
// set creator pb
$creator_pb = $seller->image;
// set content name // set content name
$content_name = $productData->name; $content_name = $product->name;
// set content price // set content price
$content_price = $productData->base_price; $content_price = $product->base_price;
// set procuct url // set procuct url
$content_url = "https://jinxxy.com/" . $data->props->pageProps->username . "/" . $data->props->pageProps->url_slug; $content_url = $product->url;
// set no rating // set no rating
$content_rating = "null"; $content_rating = "null";
// currency type // currency type
$currency_currency = strtolower($productData->currency_code); $currency_currency = $product->currencySymbol;
$databaseConnection = new mysqli("localhost", "furatalog_usr", "1yRNpaUtXu[cw@-m", "furatalog"); $databaseConnection = new mysqli("localhost", "furatalog_usr", "1yRNpaUtXu[cw@-m", "furatalog");
$result = $databaseConnection->query("SELECT * FROM `currency` WHERE currency=\"" . $currency_currency . "\";"); $result = $databaseConnection->query("SELECT * FROM `currency` WHERE symbol=\"" . $currency_currency . "\";");
$content_currency_id = $result->fetch_assoc()["id"]; $content_currency_id = $result->fetch_assoc()["id"];