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/.cursor-server/data/User/History/-3df8ec43/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/.cursor-server/data/User/History/-3df8ec43/vnHt.php
<?php
/**
 * Generate Holiday Gift OG Image for Facebook Sharing
 * Creates a festive Open Graph image with SoundStudioPro logo and holiday theme
 */

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

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

// Create image with optimal OG dimensions (Facebook recommended: 1200x630)
$width = 1200;
$height = 630;
$image = imagecreatetruecolor($width, $height);

// Enable alpha blending
imagealphablending($image, true);
imagesavealpha($image, true);

// Holiday color palette
$holiday_red = [252, 165, 165];      // #fca5a5
$holiday_orange = [251, 146, 60];    // #fb923c
$holiday_yellow = [251, 191, 36];    // #fbbf24
$holiday_green = [52, 211, 153];     // #34d399
$holiday_blue = [96, 165, 250];      // #60a5fa
$bg_dark = [10, 10, 10];             // #0a0a0a
$bg_darker = [26, 26, 26];           // #1a1a1a

// Create dark gradient background with holiday glow
for ($y = 0; $y < $height; $y++) {
    for ($x = 0; $x < $width; $x++) {
        // Create a subtle gradient from dark to slightly lighter dark
        $ratio = $y / $height;
        $r = round($bg_dark[0] + ($bg_darker[0] - $bg_dark[0]) * $ratio);
        $g = round($bg_dark[1] + ($bg_darker[1] - $bg_dark[1]) * $ratio);
        $b = round($bg_dark[2] + ($bg_darker[2] - $bg_dark[2]) * $ratio);
        
        $color = imagecolorallocate($image, $r, $g, $b);
        imagesetpixel($image, $x, $y, $color);
    }
}

// Add holiday-colored particles/glow effects
$particle_colors = [
    imagecolorallocatealpha($image, $holiday_red[0], $holiday_red[1], $holiday_red[2], 100),
    imagecolorallocatealpha($image, $holiday_orange[0], $holiday_orange[1], $holiday_orange[2], 100),
    imagecolorallocatealpha($image, $holiday_yellow[0], $holiday_yellow[1], $holiday_yellow[2], 100),
    imagecolorallocatealpha($image, $holiday_green[0], $holiday_green[1], $holiday_green[2], 100),
    imagecolorallocatealpha($image, $holiday_blue[0], $holiday_blue[1], $holiday_blue[2], 100),
];

// Add glowing particles
$num_particles = 80;
for ($i = 0; $i < $num_particles; $i++) {
    $x = rand(0, $width);
    $y = rand(0, $height);
    $size = rand(3, 8);
    $color = $particle_colors[array_rand($particle_colors)];
    imagefilledellipse($image, $x, $y, $size, $size, $color);
}

// Define text colors
$text_white = imagecolorallocate($image, 255, 255, 255);
$text_red = imagecolorallocate($image, $holiday_red[0], $holiday_red[1], $holiday_red[2]);
$text_orange = imagecolorallocate($image, $holiday_orange[0], $holiday_orange[1], $holiday_orange[2]);
$text_yellow = imagecolorallocate($image, $holiday_yellow[0], $holiday_yellow[1], $holiday_yellow[2]);

// Font paths (try multiple locations including system fonts)
$font_paths = [
    'assets/fonts/Poppins-Bold.ttf',
    'assets/fonts/Inter-Bold.ttf',
    __DIR__ . '/assets/fonts/Poppins-Bold.ttf',
    __DIR__ . '/assets/fonts/Inter-Bold.ttf',
    // System fonts fallbacks
    '/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',
    '/usr/share/fonts/TTF/DejaVuSans-Bold.ttf',
    '/usr/local/share/fonts/dejavu/DejaVuSans-Bold.ttf',
];

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

// Add holiday badge text
if ($font_path && function_exists('imagettftext')) {
    // Holiday badge
    $badge_text = "🎄 Holiday Gift Certificate 🎄";
    $badge_size = 32;
    $badge_y = 150;
    
    // Text shadow
    $shadow_color = imagecolorallocatealpha($image, 0, 0, 0, 120);
    imagettftext($image, $badge_size, 0, 601, $badge_y + 1, $shadow_color, $font_path, $badge_text);
    imagettftext($image, $badge_size, 0, 600, $badge_y, $text_orange, $font_path, $badge_text);
    
    // Main title
    $title_text = "5 Free Songs";
    $title_size = 96;
    $title_y = $badge_y + 100;
    
    // Calculate text width for centering
    $bbox = imagettfbbox($title_size, 0, $font_path, $title_text);
    $title_width = $bbox[4] - $bbox[0];
    $title_x = (int)(($width - $title_width) / 2);
    
    // Text shadow for title
    imagettftext($image, $title_size, 0, $title_x + 3, $title_y + 3, $shadow_color, $font_path, $title_text);
    // Gradient effect for title (using orange to yellow)
    imagettftext($image, $title_size, 0, $title_x, $title_y, $text_orange, $font_path, $title_text);
    
    // Subtitle
    $subtitle_text = "Create Beautiful Music This Holiday Season";
    $subtitle_size = 36;
    $subtitle_y = $title_y + 120;
    
    $bbox = imagettfbbox($subtitle_size, 0, $font_path, $subtitle_text);
    $subtitle_width = $bbox[4] - $bbox[0];
    $subtitle_x = (int)(($width - $subtitle_width) / 2);
    
    imagettftext($image, $subtitle_size, 0, $subtitle_x + 2, $subtitle_y + 2, $shadow_color, $font_path, $subtitle_text);
    imagettftext($image, $subtitle_size, 0, $subtitle_x, $subtitle_y, $text_white, $font_path, $subtitle_text);
    
    // Add SoundStudioPro branding at top
    $brand_text = "SoundStudioPro";
    $brand_size = 48;
    $brand_y = 80;
    
    $bbox = imagettfbbox($brand_size, 0, $font_path, $brand_text);
    $brand_width = $bbox[4] - $bbox[0];
    $brand_x = (int)(($width - $brand_width) / 2);
    
    imagettftext($image, $brand_size, 0, $brand_x + 2, $brand_y + 2, $shadow_color, $font_path, $brand_text);
    imagettftext($image, $brand_size, 0, $brand_x, $brand_y, $text_white, $font_path, $brand_text);
    
    // Tagline at bottom
    $tagline_text = "No credit card required • Start creating instantly";
    $tagline_size = 24;
    $tagline_y = $height - 40;
    
    $bbox = imagettfbbox($tagline_size, 0, $font_path, $tagline_text);
    $tagline_width = $bbox[4] - $bbox[0];
    $tagline_x = (int)(($width - $tagline_width) / 2);
    
    $tagline_color = imagecolorallocate($image, 160, 174, 192); // #a0aec0
    imagettftext($image, $tagline_size, 0, $tagline_x, $tagline_y, $tagline_color, $font_path, $tagline_text);
    
} else {
    // Fallback to built-in fonts if TTF not available
    // Use largest built-in font (5) and scale with multiple writes
    
    // SoundStudioPro branding - centered at top
    $brand = 'SoundStudioPro';
    $brand_x = (int)(($width - (strlen($brand) * 9)) / 2);
    imagestring($image, 5, $brand_x, 60, $brand, $text_white);
    
    // Holiday badge
    $badge = '*** HOLIDAY GIFT CERTIFICATE ***';
    $badge_x = (int)(($width - (strlen($badge) * 9)) / 2);
    imagestring($image, 5, $badge_x, 140, $badge, $text_orange);
    
    // Main title - make it bigger by drawing multiple times
    $title = '5 FREE SONGS';
    $title_width = strlen($title) * 18; // Approximate width for scaled text
    $title_x = (int)(($width - $title_width) / 2);
    
    // Draw title larger by using multiple offset copies
    for ($ox = -1; $ox <= 1; $ox++) {
        for ($oy = -1; $oy <= 1; $oy++) {
            imagestring($image, 5, $title_x + $ox, 220 + $oy, $title, $text_yellow);
            imagestring($image, 5, $title_x + $ox + 1, 235 + $oy, $title, $text_yellow);
        }
    }
    // Core text
    imagestring($image, 5, $title_x, 220, $title, $text_white);
    imagestring($image, 5, $title_x + 1, 235, $title, $text_white);
    
    // Subtitle
    $subtitle = 'Create Beautiful Music This Holiday Season';
    $subtitle_x = (int)(($width - (strlen($subtitle) * 9)) / 2);
    imagestring($image, 5, $subtitle_x, 320, $subtitle, $text_white);
    
    // Features row
    $feature1 = 'AI-Powered';
    $feature2 = 'Instant Download';
    $feature3 = 'Commercial Rights';
    $f_y = 420;
    imagestring($image, 4, 200, $f_y, $feature1, $text_red);
    imagestring($image, 4, 500, $f_y, $feature2, $text_orange);
    imagestring($image, 4, 850, $f_y, $feature3, $text_yellow);
    
    // Tagline at bottom
    $tagline = 'No credit card required - Start creating instantly';
    $tagline_x = (int)(($width - (strlen($tagline) * 8)) / 2);
    $tagline_color = imagecolorallocate($image, 160, 174, 192);
    imagestring($image, 4, $tagline_x, 560, $tagline, $tagline_color);
}

// Add decorative holiday icons (simple shapes)
$icon_y = $height - 100;
$icon_spacing = 150;
$icon_start_x = ($width - ($icon_spacing * 3)) / 2;

// Gift icon (simple rectangle with bow)
$gift_x = $icon_start_x;
imagefilledrectangle($image, $gift_x - 20, $icon_y - 15, $gift_x + 20, $icon_y + 15, $text_red);
imagefilledellipse($image, $gift_x, $icon_y - 15, 10, 10, $text_yellow);

// Music note (simple shape)
$music_x = $icon_start_x + $icon_spacing;
imagefilledellipse($image, $music_x, $icon_y, 12, 12, $text_orange);
imageline($image, $music_x + 6, $icon_y - 8, $music_x + 6, $icon_y - 20, $text_orange);

// Star
$star_x = $icon_start_x + ($icon_spacing * 2);
$points = [];
for ($i = 0; $i < 5; $i++) {
    $angle = ($i * 2 * M_PI / 5) - (M_PI / 2);
    $points[] = $star_x + cos($angle) * 15;
    $points[] = $icon_y + sin($angle) * 15;
}
imagefilledpolygon($image, $points, 5, $text_yellow);

// Heart
$heart_x = $icon_start_x + ($icon_spacing * 3);
imagefilledellipse($image, $heart_x - 8, $icon_y, 12, 12, $text_red);
imagefilledellipse($image, $heart_x + 8, $icon_y, 12, 12, $text_red);
$heart_points = [
    $heart_x, $icon_y + 15,
    $heart_x - 12, $icon_y + 5,
    $heart_x + 12, $icon_y + 5,
];
imagefilledpolygon($image, $heart_points, 3, $text_red);

// Output the image
imagepng($image);
imagedestroy($image);
?>


CasperSecurity Mini