Monday, October 1, 2018
Saturday, September 29, 2018
Tuesday, September 25, 2018
Sunday, September 23, 2018
Saturday, September 22, 2018
Monday, September 10, 2018
Sunday, September 9, 2018
Saturday, September 8, 2018
Wednesday, September 5, 2018
Tuesday, September 4, 2018
Monday, September 3, 2018
Sunday, September 2, 2018
Saturday, September 1, 2018
Structure of Gmail PHPMailer using PHP
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'vendor/autoload.php';
if(isset($_POST['send']))
{
$to_id = $_POST['toid'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$mail = new PHPMailer(true);
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'your@gmail.com';
$mail->Password = 'YourPassword';
$mail->SMTPSecure = 'tls';
$mail->Port = 587;
$mail->setFrom('vedprakash151994@gmail.com', 'Ved Prakash N');
$mail->addAddress($to_id);
$mail->Subject = $subject;
$mail->Body = $message;
if(!$mail->send())
{
$error = "Mailer Error: " .$mail->ErrorInfo;
echo "<div class=display> '.$error.' </div>";
}
else
{
echo " <div class=display> Message Sent </div>";
}
}
else
{
echo "<div class=display> Please Enter Valid Data </div> ";
}
?>
Saturday, August 25, 2018
Wednesday, August 22, 2018
Sunday, August 19, 2018
Saturday, August 18, 2018
Friday, August 17, 2018
Structure of Facebook PHP SDK in PHP
<?php
require_once ('vendor/autoload.php');
$fb = new Facebook\Facebook([
'app_id' => '************',
'app_secret' => '************************',
'default_graph_version' => 'v2.3',
]);
$pageAccessToken = '************************************';
try
{
$response = $fb->post('/me/feed', $pageAccessToken);
}
catch(Facebook\Exceptions\FacebookResponseException $e)
{
echo 'Graph returned an error: '.$e->getMessage();
exit;
}
catch(Facebook\Exceptions\FacebookSDKException $e)
{
echo 'Facebook SDK returned an Error: '.$e->getMessage();
exit;
exit;
}
$graphNode = $response->getGraphNode();
echo 'ID:'.$graphNode['id'];
?>
Thursday, August 16, 2018
Wednesday, August 15, 2018
Saturday, August 11, 2018
Wednesday, August 8, 2018
Saturday, August 4, 2018
Friday, July 27, 2018
Thursday, July 26, 2018
Wednesday, July 25, 2018
Tuesday, July 24, 2018
Saturday, July 21, 2018
Monday, July 16, 2018
Sunday, July 15, 2018
Subscribe to:
Posts (Atom)