This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://js.instamojo.com/v1/checkout.js"></script> | |
<script> | |
Instamojo.open("YOUR_INSTAMOJO_LINK_HERE"); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$amount = $_POST['amount']; // this is dynamic | |
$name = $_POST['name']; // this is dynamic | |
$number = $_POST['number']; // this is dynamic | |
$email = $_POST['email']; // this is dynamic | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, 'https://'.$mode.'.instamojo.com/api/1.1/payment-requests/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(0); | |
function upload_to_imgur($image){ | |
$image = file_get_contents($image); | |
$curl = curl_init(); | |
curl_setopt_array($curl, array( | |
CURLOPT_URL => "https://api.imgur.com/3/image", | |
CURLOPT_RETURNTRANSFER => true, | |
CURLOPT_ENCODING => "", | |
CURLOPT_MAXREDIRS => 10, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'upload.php'; | |
?> | |
<!DOCTYPE html> | |
<html> | |
<title>Imgur Image upload in php</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | |
<link rel="stylesheet" href="//cdn.jsdelivr.net/gh/highlightjs/cdn-release@9.13.0/build/styles/atom-one-dark-reasonable.min.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'sendemail.php'; | |
$to = 'recipientemail@gmail.com'; | |
$subject = 'Subject for PHPMailer'; | |
$body = 'here is the demo body for email'; | |
$send = send_mail($to,$subject,$body); | |
if($send == 1){ | |
echo 'Mail Sent!'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Server settings | |
$mail->SMTPDebug = 0; // Enable verbose debug output | |
$mail->isSMTP(); // Set mailer to use SMTP | |
$mail->Host = 'YOUR_HOST_HERE'; // Specify main and backup SMTP servers | |
$mail->SMTPAuth = true; // Enable SMTP authentication | |
$mail->Username = 'YOUR_SMTP_USERNAME'; // SMTP username | |
$mail->Password = 'YOUR_SMTP_PASSWORD'; // SMTP password | |
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted | |
$mail->Port = 587; // TCP port to connect to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\Exception; | |
include_once "PHPMailer/PHPMailer.php"; | |
include_once "PHPMailer/Exception.php"; | |
include_once "PHPMailer/SMTP.php"; | |
function send_mail($to,$subject,$body){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 200, | |
"status_message": "sms_success", | |
"data": { | |
"balance": "Updated Balance", | |
"number": "Mobile number", | |
"txn_id": "Transaction Id", | |
"message_body": "Message Body" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"status": 404, | |
"status_message": "reason of error", | |
"data": null | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function send_sms($senderid,$number,$message,$route){ | |
$message = urlencode($message); | |
$api_key = "YOUR_API_KEY"; | |
$url = 'https://api.paysify.com/send_sms?api_key='.$api_key.'&sender_id='.$senderid.'&number='.$number.'&message='.$message.'&route='.$route.''; | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |