Skip to content

Instantly share code, notes, and snippets.

View hackerrahul's full-sized avatar
💻

HackerRahul hackerrahul

💻
View GitHub Profile
<?php
/**
* Upload version 1.0
* Created by HackerRahul http://HackerRahul.com
* Date 24 august 2015
*/
class Upload{
// make variables of parameters
private $_upload,
<?php
function detect_sentiment($string){
$string = urlencode($string);
$api_key = "YOUR_API_KEY";
$url = 'https://api.paysify.com/sentiment?api_key='.$api_key.'&string='.$string.'';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
{
"status": 200,
"status_message": "success",
"data": {
"string": "String you have passed",
"state": "Positive/Negative/Neutral",
"scores": {
"neg": 0,
"neu": 0,
"pos": 0,
<table id="myTable" class="w3-table-all">
<tr>
<th onclick="w3.sortHTML('#myTable', '.item', 'td:nth-child(1)')" style="cursor:pointer" class='w3-hover-grey'>Country <i class="fa fa-sort" style="font-size:13px;"></i></th>
<th onclick="w3.sortHTML('#myTable', '.item', 'td:nth-child(2)')" style="cursor:pointer" class='w3-hover-grey'>Capital <i class="fa fa-sort" style="font-size:13px;"></i></th>
</tr>
<tr class="item">
<td>India</td>
<td>New Delhi</td>
</tr>
<tr class="item">
<p><button onclick="w3.sortHTML('#id01', 'li')" class="w3-button w3-blue">Sort</button></p>
<ul id="id01" class="w3-ul w3-white w3-border w3-margin">
<li>Oslo</li>
<li>Stockholm</li>
<li>Helsinki</li>
<li>Berlin</li>
<li>Rome</li>
<li>Madrid</li>
</ul>
<script src="https://www.w3schools.com/lib/w3.js"></script>
{"status":200,"status_message":"success","data":{"sms_credits":"500"}}
<?php
function check_balance($api_key){
$url = 'https://api.paysify.com/balance_api?api_key='.$api_key;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
$response = json_decode($result,true);
curl_close($ch);
<?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);
{
"status": 404,
"status_message": "reason of error",
"data": null
}