Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $imageBg = imageCreateFromJpeg('0S8cX71.jpg');
- $fontArial = 'Arial_Bold.ttf';
- $code = isset($_GET['code']) ? $_GET['code'] : null; // '4810520';
- $source = isset($_GET['source']) ? $_GET['source'] : null; // 'Definetely not fake news CNN';
- $text = isset($_GET['text']) ? $_GET['text']: null; // 'Lorem ipsum\ndolor sit amed\nconsequetuer dolor.';
- $quote = isset($_GET['quote']) ? $_GET['quote']: null; // '- Prophet Pepe, the relevations of Kek';
- if($text) {
- $blackColor = imagecolorallocate($imageBg, 0, 0, 0);
- //varified code:
- $verifSize = 19;
- $verifX = 488;
- $verifY = 600 - 57;
- imagettftext($imageBg, $verifSize, 0, $verifX, $verifY, $blackColor, $fontArial, $code);
- //source:
- $sourceSize = 17;
- $sourceX = 90;
- $sourceY = 600 - 48;
- imagettftext($imageBg, $sourceSize, 90, $sourceX, $sourceY, $blackColor, $fontArial, $source);
- //text:
- $textSize = 40;
- $textX = 166;
- $textY = 600 - 400;
- imagettftext($imageBg, $textSize, 0, $textX, $textY, $blackColor, $fontArial, '“'.str_replace('\n', "\n", $text).'”');
- //quote:
- $quoteSize = 30;
- $quoteX = 166;
- $quoteY = 600 - 340 + 70 * substr_count($text, '\n');
- imagettftext($imageBg, $quoteSize, 0, $quoteX, $quoteY, $blackColor, $fontArial, $quote);
- //get image data
- ob_start();
- imagepng($imageBg);
- $imgData = base64_encode(ob_get_clean());
- //destroy image ibjects
- imagedestroy($imageBg);
- }
- ?>
- <div>
- <div style="display: inline-block;">
- <h3>Real Verrit:</h3>
- <image style="width: 600px; height: 300px" src="verrit-0443118.jpg" />
- </div>
- <div style="display: inline-block;">
- <h3>Fake Verrit from this generator:</h3>
- <image style="width: 600px; height: 300px" src="download.png" />
- </div>
- </div>
- <?php
- if(isset($imgData)) {
- ?>
- <h3 style="color: red;">Your Verrit:</h3>
- <image style="width: 600px; height: 300px" src="data:image/png;base64,<?= $imgData ?>" /> <br />
- <?php
- }
- ?>
- <h1>Verrit fake image generator</h1>
- <form method="GET">
- <table>
- <tr>
- <td>Main text:</td>
- <td><input name="text" value="<?= $text ?>" size="80" placeholder="Fake quote\nanother line." /></td>
- <td>The main text without the double quotes. Use \n to separate lines.</td>
- </tr>
- <tr>
- <td>Quote by:</td>
- <td><input name="quote" value="<?= $quote ?>" size="80" placeholder="Prophet Pepe, the relevations of Kek" /></td>
- <td>Who is the quote from (include the dash at the start to make it look more authentic)</td>
- </tr>
- <tr>
- <td>Source:</td>
- <td><input name="source" value="<?= $source ?>" size="80" placeholder="Definetely not fake news CNN" /></td>
- <td>Source of this quote (include a date to make it look more authentic)</td>
- </tr>
- <tr>
- <td>Code:</td>
- <td><input name="code" value="<?= $code ?>" size="80" placeholder="4810520" /></td>
- <td>7-digit verification code</td>
- </tr>
- <tr>
- <td></td>
- <td><input type="submit" value="Generate" /></td>
- <td>Praise Kek.</td>
- </tr>
- </table>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement