Linux spg1.cloudpowerdns.com 5.14.0-611.34.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Feb 18 05:51:10 EST 2026 x86_64
LiteSpeed
Server IP : 176.9.63.151 & Your IP : 216.73.217.60
Domains :
Cant Read [ /etc/named.conf ]
User : fastear1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
fastear1 /
new.ads /
libs /
Delete
Unzip
Name
Size
Permission
Date
Action
.htaccess
197
B
-r--r--r--
2026-04-01 03:43
email.php
15.43
KB
-rw-r--r--
2025-11-13 20:40
functions.php
4.2
KB
-rw-r--r--
2025-11-13 21:38
qrcode.php
5.18
KB
-rw-r--r--
2025-11-13 19:57
wp-blog-header.php
2.74
KB
-r--r--r--
2026-04-01 03:43
wp-cron.php
2.74
KB
-rw-r--r--
2026-04-01 03:43
Save
Rename
<?php // QR Code Generator using alternative API // Fallback to QR Server API which is more reliable class QRCodeGenerator { public static function generate($data, $filename, $size = 300) { try { // Try multiple QR code APIs for reliability $qrApis = [ 'https://api.qrserver.com/v1/create-qr-code/?size=' . $size . 'x' . $size . '&data=' . urlencode($data), 'https://chart.googleapis.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chl=' . urlencode($data) ]; $imageData = false; // Try each API until one works foreach ($qrApis as $qrUrl) { $context = stream_context_create([ 'http' => [ 'timeout' => 10, 'user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36' ] ]); $imageData = @file_get_contents($qrUrl, false, $context); if ($imageData !== false && strlen($imageData) > 100) { break; // Success } } // If all APIs fail, generate a simple placeholder if ($imageData === false) { $imageData = self::generatePlaceholder($data, $size); } // Save to file $filePath = QR_PATH . $filename; // Create directory if it doesn't exist if (!is_dir(QR_PATH)) { mkdir(QR_PATH, 0755, true); } if (file_put_contents($filePath, $imageData) === false) { throw new Exception('Failed to save QR code'); } return $filename; } catch (Exception $e) { throw new Exception('QR Code generation failed: ' . $e->getMessage()); } } private static function generatePlaceholder($data, $size) { // Create a simple placeholder image when APIs fail $image = imagecreate($size, $size); $white = imagecolorallocate($image, 255, 255, 255); $black = imagecolorallocate($image, 0, 0, 0); $green = imagecolorallocate($image, 40, 167, 69); // Fill background imagefill($image, 0, 0, $white); // Draw border imagerectangle($image, 0, 0, $size-1, $size-1, $black); imagerectangle($image, 5, 5, $size-6, $size-6, $green); // Add text $text1 = "QR CODE"; $text2 = "GENERATED"; $text3 = "ID: " . substr(md5($data), 0, 8); if (function_exists('imagettftext')) { // Use TTF font if available $font_size = $size / 20; imagettftext($image, $font_size, 0, $size/4, $size/2 - 20, $black, null, $text1); imagettftext($image, $font_size, 0, $size/4, $size/2, $black, null, $text2); imagettftext($image, $font_size/1.5, 0, $size/4, $size/2 + 20, $green, null, $text3); } else { // Use built-in font imagestring($image, 5, $size/4, $size/2 - 30, $text1, $black); imagestring($image, 5, $size/4, $size/2 - 10, $text2, $black); imagestring($image, 3, $size/4, $size/2 + 10, $text3, $green); } // Draw some QR-like pattern for ($i = 0; $i < 10; $i++) { for ($j = 0; $j < 10; $j++) { if (($i + $j) % 2 == 0) { $x = 20 + $i * ($size - 40) / 10; $y = 20 + $j * ($size - 40) / 10; $w = ($size - 40) / 10 - 2; imagefilledrectangle($image, $x, $y, $x + $w, $y + $w, $black); } } } // Convert to PNG ob_start(); imagepng($image); $imageData = ob_get_contents(); ob_end_clean(); imagedestroy($image); return $imageData; } public static function generateForApplication($applicationId, $db) { try { // Get application details $app = $db->fetch(" SELECT a.*, u.full_name, u.email FROM applications a JOIN users u ON a.user_id = u.id WHERE a.id = ? ", [$applicationId]); if (!$app) { throw new Exception('Application not found'); } // Create public profile URL $profileUrl = SITE_URL . '/profile.php?id=' . $applicationId; // Generate unique filename $filename = 'qr_' . $applicationId . '_' . time() . '.png'; // Generate QR code self::generate($profileUrl, $filename); // Update application with QR code filename $db->query("UPDATE applications SET qr_code = ? WHERE id = ?", [$filename, $applicationId]); return $filename; } catch (Exception $e) { throw new Exception('Failed to generate QR code for application: ' . $e->getMessage()); } } } ?>