T.ME/BIBIL_0DAY
CasperSecurity


Server : Apache/2
System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64
User : gositeme ( 1004)
PHP Version : 8.2.29
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Directory :  /home/gositeme/domains/soundstudiopro.com/private_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/generate_holiday_og_image.php
<?php
/**
 * Generate Holiday Gift OG Image for Facebook Sharing
 * Clean, professional design without fancy fonts
 */

// Check if GD extension is available
if (!extension_loaded('gd')) {
    header('Location: /assets/images/og-image.png');
    exit;
}

header('Content-Type: image/png');
header('Cache-Control: public, max-age=86400');

// Facebook recommended dimensions
$width = 1200;
$height = 630;
$image = imagecreatetruecolor($width, $height);

// Simple dark background - solid color, no slow gradients
$bg_color = imagecolorallocate($image, 15, 15, 25); // Dark blue-black
imagefilledrectangle($image, 0, 0, $width, $height, $bg_color);

// Add a subtle gradient overlay using rectangles (much faster than pixel-by-pixel)
for ($i = 0; $i < 10; $i++) {
    $alpha = 120 - ($i * 5);
    $overlay = imagecolorallocatealpha($image, 102, 126, 234, $alpha); // Purple tint
    $y_start = ($height / 10) * $i;
    $y_end = ($height / 10) * ($i + 1);
    imagefilledrectangle($image, 0, (int)$y_start, $width, (int)$y_end, $overlay);
}

// Colors
$white = imagecolorallocate($image, 255, 255, 255);
$orange = imagecolorallocate($image, 251, 146, 60);
$yellow = imagecolorallocate($image, 251, 191, 36);
$gray = imagecolorallocate($image, 160, 174, 192);
$gold = imagecolorallocate($image, 255, 215, 0);

// Try to find a usable font
$font_paths = [
    __DIR__ . '/assets/fonts/Poppins-Bold.ttf',
    __DIR__ . '/assets/fonts/Inter-Bold.ttf',
    '/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf',
    '/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf',
    '/usr/share/fonts/truetype/freefont/FreeSansBold.ttf',
    '/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf',
];

$font = null;
foreach ($font_paths as $path) {
    if (file_exists($path)) {
        $font = $path;
        break;
    }
}

// Helper function to center text
function centerText($image, $font, $size, $text, $y, $color, $width) {
    if ($font) {
        $bbox = imagettfbbox($size, 0, $font, $text);
        $text_width = $bbox[2] - $bbox[0];
        $x = (int)(($width - $text_width) / 2);
        
        // Shadow
        $shadow = imagecolorallocatealpha($image, 0, 0, 0, 80);
        imagettftext($image, $size, 0, $x + 2, $y + 2, $shadow, $font, $text);
        imagettftext($image, $size, 0, $x, $y, $color, $font, $text);
    } else {
        // Fallback with built-in font
        $char_width = imagefontwidth(5);
        $x = (int)(($width - (strlen($text) * $char_width)) / 2);
        imagestring($image, 5, $x, $y - 8, $text, $color);
    }
}

// Draw decorative border
$border_color = imagecolorallocatealpha($image, 251, 191, 36, 100);
imagerectangle($image, 30, 30, $width - 30, $height - 30, $border_color);
imagerectangle($image, 35, 35, $width - 35, $height - 35, $border_color);

// Brand name at top
centerText($image, $font, 36, 'SoundStudioPro', 100, $white, $width);

// Holiday badge
centerText($image, $font, 28, 'HOLIDAY GIFT CERTIFICATE', 170, $orange, $width);

// Main headline - big and bold
centerText($image, $font, $font ? 80 : 48, '5 FREE SONGS', 280, $gold, $width);

// Subtitle
centerText($image, $font, 32, 'Create Beautiful Music This Holiday', 360, $white, $width);

// Value proposition line
centerText($image, $font, 24, 'AI-Powered  |  Instant Download  |  Commercial Rights', 440, $gray, $width);

// Call to action
$cta_y = 520;
$cta_width = 400;
$cta_height = 60;
$cta_x = (int)(($width - $cta_width) / 2);

// CTA button background
$cta_bg = imagecolorallocate($image, 251, 146, 60);
imagefilledrectangle($image, $cta_x, $cta_y, $cta_x + $cta_width, $cta_y + $cta_height, $cta_bg);

// CTA text
if ($font) {
    $cta_text = 'CLAIM YOUR FREE GIFT';
    $bbox = imagettfbbox(22, 0, $font, $cta_text);
    $cta_text_x = $cta_x + (int)(($cta_width - ($bbox[2] - $bbox[0])) / 2);
    $cta_text_y = $cta_y + 40;
    imagettftext($image, 22, 0, $cta_text_x, $cta_text_y, $white, $font, $cta_text);
} else {
    $cta_text = 'CLAIM YOUR FREE GIFT';
    $cta_text_x = $cta_x + (int)(($cta_width - (strlen($cta_text) * 9)) / 2);
    imagestring($image, 5, $cta_text_x, $cta_y + 22, $cta_text, $white);
}

// Output
imagepng($image);
imagedestroy($image);

CasperSecurity Mini