Skip to content

Instantly share code, notes, and snippets.

View hackerrahul's full-sized avatar
💻

HackerRahul hackerrahul

💻
View GitHub Profile
<script src="https://js.instamojo.com/v1/checkout.js"></script>
<script>
Instamojo.open("YOUR_INSTAMOJO_LINK_HERE");
</script>
<?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/');
<?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">
<?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!';
<?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
<?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){
{
"status": 404,
"status_message": "reason of error",
"data": null
}
{
"status": 200,
"status_message": "sms_success",
"data": {
"balance": "Updated Balance",
"number": "Mobile number",
"txn_id": "Transaction Id",
"message_body": "Message Body"
}
}
{"status":200,"status_message":"success","data":{"sms_credits":"500"}}
<?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);