403Webshell
Server IP : 35.80.110.71  /  Your IP : 216.73.216.221
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/2798582/cwd/scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/2798582/cwd/scripts/generate-og-default.php
<?php

declare(strict_types=1);

/**
 * Plan 292 §2.9 path 1 — generate the single shared OG fallback card.
 *
 * Pure PHP-GD, no external dependencies (Browsershot is NOT installed in
 * this repo — see the plan §2.9 decision). Run once and commit the PNG:
 *
 *     php scripts/generate-og-default.php
 *
 * Path 2 (per-page OG generation) is gated behind a future Browsershot
 * install + Chromium deploy-env verification; this script holds us over.
 */
$outPath = dirname(__DIR__).'/public/og/websites-default.png';
$width = 1200;
$height = 630;

if (! function_exists('imagecreatetruecolor')) {
    fwrite(STDERR, "GD extension is required.\n");
    exit(1);
}

$im = imagecreatetruecolor($width, $height);

// Background — forge-surface tint.
$bg = imagecolorallocate($im, 0xFA, 0xFA, 0xF7);
imagefill($im, 0, 0, $bg);

// Diagonal forge-copper band across the top (~80px tall).
$copper = imagecolorallocate($im, 0xD4, 0x62, 0x2A);
$bandPoints = [0, 0,   $width, 0,   $width, 80,   0, 110];
imagefilledpolygon($im, $bandPoints, $copper);

// Spark glyph (filled star) in the band, left side.
$spark = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$cx = 70;
$cy = 55;
$r = 28;
$starPoints = [];
for ($i = 0; $i < 10; $i++) {
    $angle = ($i / 10) * 2 * M_PI - M_PI / 2;
    $radius = $i % 2 === 0 ? $r : $r / 2.4;
    $starPoints[] = (int) ($cx + cos($angle) * $radius);
    $starPoints[] = (int) ($cy + sin($angle) * $radius);
}
imagefilledpolygon($im, $starPoints, $spark);

// Wordmark in the band.
$wordmark = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
imagestring($im, 5, 120, 40, 'ScopeForged Websites', $wordmark);

// Headline — large, ink color.
$ink = imagecolorallocate($im, 0x11, 0x11, 0x11);
$subtext = imagecolorallocate($im, 0x52, 0x52, 0x52);
$deep = imagecolorallocate($im, 0x8C, 0x3F, 0x18);

// Use built-in font 5 (largest) and scale up by drawing larger via repeated
// imagestring layers. GD's built-in fonts max at 5; for crisper output we
// rely on the band + accent color and let consuming platforms scale the
// PNG. A real per-page OG flow lives in path 2.
imagestring($im, 5, 60, 220, 'Websites that book the call.', $ink);
imagestring($im, 5, 60, 260, 'Built, hosted, and tuned for $149/mo.', $deep);

imagestring($im, 4, 60, 340, 'For roofers, dentists, law firms, and coaches.', $subtext);
imagestring($im, 4, 60, 365, 'Real conversion patterns. No plugin sprawl.', $subtext);

imagestring($im, 4, 60, 540, 'websites.scopeforged.com', $copper);

// Bottom thin band as a closing accent.
imagefilledrectangle($im, 0, $height - 12, $width, $height, $copper);

if (! imagepng($im, $outPath, 8)) {
    fwrite(STDERR, "Failed to write $outPath\n");
    exit(1);
}

imagedestroy($im);

printf("[og:generate] wrote %s (%d bytes)\n", $outPath, filesize($outPath));

Youez - 2016 - github.com/yon3zu
LinuXploit