| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/HostingSpaces/admin/penpalamerica.com/wwwroot/penpal/ |
Upload File : |
<?php
include "general.php";
include "connect.php";
include 'sendmailclient.php';
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
header('Access-Control-Allow-Origin : *');
header('Access-Control-Allow-Methods : POST, GET, OPTIONS, PUT, DELETE');
header('Access-Control-Allow-Headers : *');
exit;
}
//$response = array();
date_default_timezone_set('africa/lagos');
//header( "Content-type: image/png" );
//imagepng($img);
$textMessage =$_POST["text"];
$email =$_POST["email"];
$payment_method = $email;
$text= $textMessage;
$img = imagecreate(400, 40);
$white = imagecolorallocate($img, 234, 236, 238);
$black = imagecolorallocate($img, 153, 163, 164 );
imagefilledrectangle($img, 0, 0, 500, 300, $white);
imagestring($img, 3, 0, 0, $text, $black);
$ext ="png";
//echo $ext;
$tempemail = str_replace('.', '', $email);
$tempfilename = $tempemail . time() . '_' . uniqid(rand(), true);
//echo $tempfilename;
$tempfilename = str_replace('.', '', $tempfilename);
$filename_unique = $tempfilename . '.'.$ext;
$file_url ="https://chatme24.com/penpalamerica/upload/php/replymessage/".$filename_unique;
$file_url2 ="../penpalamerica/upload/php/replymessage/".$filename_unique;
echo $file_url;
imagepng($img,$file_url2);
imagedestroy($img);
?>