Author Topic: Sending SMS from php and python script  (Read 166 times)

0 Members and 1 Guest are viewing this topic.

er.prashant85 (OP)

  • *
  • Status:
    Offline
    Posts:
    10
    Reputation:
    +2/-1
    • View Profile
on: April 25, 2020, 06:20:17 PM
1. First you will need access to a SMS gateway, in India https://www.textlocal.in/ provides very cheap bulk SMS

SMS                                                            Bundle
Per Bundle                                         Per SMS
10 Messages                           FREE   FREE
1,000 Messages                   ₹270   27.0 paisa
2,000 Messages   ₹540   27.0 paisa
5,000 Messages   ₹1,250   25.0 paisa
10,000 Messages   ₹2,500   25.0 paisa
25,000 Messages   ₹5,625   22.5 paisa
50,000 Messages   ₹9,500   19.0 paisa
1,00,000 Messages   ₹17,000   17.0 paisa
2,50,000 Messages   ₹40,000   16.0 paisa
5,00,000 Messages   ₹75,000   15.0 paisa
10,00,000 Messages   ₹1,45,000   14.5 paisa

Create a php file with any name on your local or hosting server, you can use either POST or GET method to send SMS, POST is considered to be more secure than GET.


Paste the following code in the php file:

Code: [Select]

<?php
// Account details
$apiKey urlencode(‘Your apiKey’);
// Message details
$numbers = array(918123456789918987654321);
$sender urlencode(‘TXTLCL’);
$message rawurlencode(‘This is your message’);
 
$numbers implode(,$numbers);
 
// Prepare data for POST request
$data = array(‘apikey’ => $apiKey‘numbers’ => $numbers“sender” => $sender“message” => $message);
// Send the POST request with cURL
$ch curl_init(‘https://api.textlocal.in/send/’);
curl_setopt($chCURLOPT_POSTtrue);
curl_setopt($chCURLOPT_POSTFIELDS$data);
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
$response curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>



the line

$sender = urlencode(‘TXTLCL’);

will not change otherwise the code API will not work

API key will be provided when you create account for paid API.

-----------------------------------------------------------------------------------------------------------------------------------------------------------

For Python the following code works:

Code: [Select]

#!/usr/bin/env python
 
import urllib.request
import urllib.parse
 
def sendSMS(apikey, numbers, sender, message):
    data =  urllib.parse.urlencode({'apikey': apikey, 'numbers': numbers,
        'message' : message, 'sender': sender})
    data = data.encode('utf-8')
    request = urllib.request.Request("https://api.textlocal.in/send/?")
    f = urllib.request.urlopen(request, data)
    fr = f.read()
    return(fr)
 
resp =  sendSMS('apikey', '918123456789',
    'Jims Autos', 'This is your message')
print (resp)




Owen

  • *
  • Status:
    Offline
    Posts:
    403
    Reputation:
    +143/-22
  • Hi there
    • View Profile
on: April 25, 2020, 07:03:39 PM
This seems really good I will definitely try it



lkzera

  • *
  • l
  • Status:
    Offline
    Posts:
    11
    Reputation:
    +1/-0
    • View Profile
on: April 26, 2020, 01:19:27 PM
very good thanks



fal9xy

  • *
  • f
  • Status:
    Offline
    Posts:
    19
    Reputation:
    +1/-0
    • View Profile
on: April 28, 2020, 09:21:07 AM
Can I deploy this to some free server like Heroku? I think this way would be perfect set up for marketing purposes with time trigger



Owen

  • *
  • Status:
    Offline
    Posts:
    403
    Reputation:
    +143/-22
  • Hi there
    • View Profile
on: April 29, 2020, 02:20:21 PM
Can I deploy this to some free server like Heroku? I think this way would be perfect set up for marketing purposes with time trigger

I think yu can



Renesmee

  • *
  • Status:
    Offline
    Posts:
    102
    Reputation:
    +0/-2
    • View Profile
on: May 07, 2020, 10:28:40 PM
thanks for share it bro



Faree

  • *
  • Status:
    Offline
    Posts:
    73
    Reputation:
    +0/-0
    • View Profile
on: May 17, 2020, 06:22:27 PM
Thanks for share it bro very good



klash

  • *
  • k
  • Status:
    Offline
    Posts:
    101
    Reputation:
    +0/-1
    • View Profile
on: May 24, 2020, 10:36:25 AM
very good thanks



zac41

  • *
  • z
  • Status:
    Offline
    Posts:
    48
    Reputation:
    +1/-0
    • View Profile
on: May 26, 2020, 09:24:46 PM
super great thank ytou !!! so hard



plokm100

  • *
  • Status:
    Offline
    Posts:
    203
    Reputation:
    +2/-1
  • Im poro poro
    • View Profile
on: June 12, 2020, 08:01:52 PM
thanks for share it bro



kaishkun

  • *
  • k
  • Status:
    Offline
    Posts:
    204
    Reputation:
    +0/-2
    • View Profile
on: June 14, 2020, 10:01:50 AM
thanks for sharing sir appreciated mate <3 <3



Museck

  • *
  • M
  • Status:
    Offline
    Posts:
    200
    Reputation:
    +1/-1
    • View Profile
on: June 14, 2020, 04:52:29 PM
Now i can troll me friend  8)



Extiinnct

  • *
  • E
  • Status:
    Offline
    Posts:
    100
    Reputation:
    +0/-0
    • View Profile
on: June 30, 2020, 07:26:07 PM
thanks for amazing hacks as always yeet



Vishalv372

  • *
  • V
  • Status:
    Offline
    Posts:
    17
    Reputation:
    +0/-0
    • View Profile
on: Today at 03:39:08 PM
can any one help me , ho w i download pubg pc hack