Skip to content

Instantly share code, notes, and snippets.

HackerRahul hackerrahul

Block or report user

Report or block hackerrahul

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View instamojo_js_sdk.php
<script src="https://js.instamojo.com/v1/checkout.js"></script>
<script>
Instamojo.open("YOUR_INSTAMOJO_LINK_HERE");
</script>
View create_request.php
<?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/');
View upload.php
<?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,
View index.php
<?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">
View sendemail_demo.php
<?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!';
View edit_these.php
<?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
View sendemail.php
<?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){
View error.json
{
"status": 404,
"status_message": "reason of error",
"data": null
}
View success.json
{
"status": 200,
"status_message": "sms_success",
"data": {
"balance": "Updated Balance",
"number": "Mobile number",
"txn_id": "Transaction Id",
"message_body": "Message Body"
}
}
View response.json
{"status":200,"status_message":"success","data":{"sms_credits":"500"}}
You can’t perform that action at this time.