Omid Bahrami
  • About Me
  • Services
  • What is my IP
  • Encrypted Messenger PHP
  • C++C++ is a general-purpose programming language. It has imperative, object-oriented and generic programming features, while also providing facilities for low-level memory manipulation. It was designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights. C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications, including desktop applications, servers (e.g. e-commerce, web search or SQL servers), and performance-critical applications (e.g. telephone switches or space probes). C++ is a compiled language, with implementations of it available on many platforms. Many vendors provide C++ compilers, including the Free Software Foundation, Microsoft, Intel, and IBM.
  • PHPPHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Originally created by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by The PHP Group. It originally stood for Personal Home Page, but it now stands for the recursive acronym : Hypertext Preprocessor It may be embedded into HTML code, or it can be used in combination with various web template systems, web content management systems, and web frameworks. As you should know it is usually processed by a interpreter implemented as a module in the web server or as a Common Gateway Interface (CGI) executable. The web server combines the results of the interpreted and executed code, which may be any type of data, including images, with the generated web page. It may also be executed with a command-line interface (CLI) and can be used to implement standalone graphical applications.
  • Search
  • Menu Menu
  • Mail
  • LinkedIn
  • Instagram
encrypted messenger php

Sign up Page Encrypted Messenger PHP

Sign up Page

Encrypted Messenger PHP

isset

The isset() function is used to check whether a variable is set or not.
If a variable is already unset with unset() function, it will no longer be set.
The isset() function return false if testing variable contains a NULL value.

file_get_contents

The file_get_contents() reads a file into a string.
This function is the preferred way to read the contents of a file into a string. Because it will use memory mapping techniques, if this is supported by the server, to enhance performance.

json_decode

PHP’s json_decode() function takes a JSON string and converts it into a PHP variable. Typically, the JSON data will represent a JavaScript array or object literal which json_decode() will convert into a PHP array or object.

array

The array() function is used to create an array.
In PHP, there are three types of arrays:
Indexed arrays – Arrays with numeric index
Associative arrays – Arrays with named keys
Multidimensional arrays – Arrays containing one or more arrays

Create a file named index.php


<?php
function secured_error () { die("Secured By Omid Bahrami"); }
set_error_handler("secured_error");

require '../secured/secured-structure.php';
require '../secured/secured-database.php';
require '../secured/secured-encryption.php';
require '../secured/secured-validation.php';

session_start();
gns_check_https();
gns_check_cookie();
$e1=$e2=$e3=FALSE;

if(isset($_POST["signup"]))
{

if($_POST["g-recaptcha-response"]!=NULL)
{

$sk = XSECRETKEYX;
$gc = $_POST['g-recaptcha-response'];
$ip = $_SERVER['REMOTE_ADDR'];

$xxx=file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$sk.'&response='.$gc.'&remoteip='.$ip);
$xcheckx=json_decode($xxx);

if ($xcheckx->success==false)
$e1=TRUE;

else if ($xcheckx->success==true)
{

$gt=array("user"=>"user" , "pass"=>"pass" , "email"=>"email" );
if(gns_check_form($gt))
{

$xux=gns_hash_fix($_POST["user"]);
$xpx=gns_hash_pro($_POST["pass"]);
$xex=gns_encode($_POST["email"]);
$xmx=gns_encode($_POST["user"]);

if(gns_check_user($xux))
{
gns_sign_up($xux,$xpx,$xex,$xmx);
header("location:../sign-in/");
}

else
$e3=TRUE;

}

else
$e2=TRUE;

}

}

else
$e1=TRUE;

}

?>
<?php
$t="Sign up";
gns_head($t);
?>
<div class="jumbotron">
<?php

if ($e1)
echo '<p class="text-primary text-center"> Check Captcha </p>';

else if($e2)
echo '<p class="text-primary text-center"> Check Input </p>';

else if($e3)
echo '<p class="text-primary text-center"> Username Is Not Available </p>';

else
gns_welcome("Sign up");

?>
</div>
<div class="jumbotron">
<form id="form1" name="form1" method="post">
<table class="table table-condensed" style="max-width: 300px" align="center">
<tbody>
<tr>
<td>
<input type="text" name="user" id="user" class="form-control" placeholder="<?php if(!gns_show_error("user")) echo "Username"; ?>" value="<?php if(!$e3) gns_show_value("user"); ?>">
</td>
</tr>
<tr>
<td>
<input type="password" name="pass" id="pass" class="form-control" placeholder="<?php if(!gns_show_error("pass")) echo "Password"; ?>">
</td>
</tr>
<tr>
<td>
<input type="email" name="email" id="email" class="form-control" placeholder="<?php if(!gns_show_error("email")) echo "Email"; ?>" value="<?php gns_show_value("email"); ?>">
</td>
</tr>
<tr>
<td>
<div align="center">
<div class="g-recaptcha" data-sitekey="<?php echo XSITEKEYX; ?>">
</div>
</div>
</td>
</tr>
<tr>
<td>
<input type="submit" name="signup" id="signup" value="Sign up" class=" btn btn-primary ">
</td>
</tr>
</tbody>
</table>
</form>
</div>
<?php gns_foot(); ?>

Full structure is available at Encrypted Messenger PHP

Share this entry
    https://omid-bahrami.com/wp-content/uploads/2024/06/encrypted-messenger-php-01.png 100 495 Omid Bahrami https://omid-bahrami.com/wp-content/uploads/2024/06/logo-01.png Omid Bahrami2018-01-28 21:16:432024-06-24 00:31:49Sign up Page Encrypted Messenger PHP

    Email

    info@omid-bahrami.com

    © 2024 Omid Bahrami. All rights reserved.
    • Mail
    • LinkedIn
    • Instagram
    Scroll to top