Script to Load a list of #'s To Send a Msg To


#1

PHP is certainly not my strong language, so I’m humbly asking for some expertise:

I need to write a script in which a list of phone numbers are copied and pasted into the page and when submitted a line of code is generated and submitted where a # from the list replaces the variable spot with 1 at a time until it runs through the list.

For example if I load a list like:

8134567890
8138904567
8137659843

And click Submit the program simply executes an HTTP request with an exact line like:

https://www.example.com/--#onList--

So it would literally produce 3 individual commands:

https://www.example.com/8134567890
https://www.example.com/8138904567
https://www.example.com/8137659843

This would go on no matter how many numbers I put in, up to an acceptable amount of course.

This would be similar she died of like an asterisk dialer which loads a list and has a script to run which is static, but replaces only the number to dial in the line of code. It is not using it to dial with a phone but simply sending an http line out because that is what the service we are currently using which is Third Rock Telecom has to send these texts

If lynx or documentation is needed further please reach out and thank you for all the help in advance

Sincerely,
sharbison.hrm


#2

Well, you would just use a foreach() loop and loop thru each of them and send each one out.

Are you sending a post to example.com’s site? Then, in that case you would need to use AJAX and post each number in the foreach loop, one at a time…


#3

I know this is a lot to ask but could you possibly send me an example of the code you would use to send that? Like I said I’m not very good at this just trying to help a friend of mine


#4

Well, I can if you give some further info. Do you need to “POST” to a site with the number in it?
You can use Curl for that. But, if you just want to create a list of URL’s, it is just a simple for each clause.

$numbers = array( 8134567890, 8138904567, 8137659843) ;
foreach ( $numbers as $number ) {
   echo "https://www.example.com/" . $number . "<br>";
}

This simple example will display the three URL’s with the numbers in place.
But, if you want to “POST” to the example.com site to send some values to that site,
you would need to process it with Curl to send the POST’d data to the site.

Still not really sure what you are asking for.


#5

Let me retry to explain, I have posted a picture below which is something very similar to what I would like to use. Only the picture below is Avicii dialer DNC ad in page. Basically you can add up to about a hundred thousand numbers just by copying and pasting and they will be added to a list in which is put into the database. Please look:

15458027874252524780400045824267

What I would like to do is simply copy and paste into a similar form and when I hit submit it would then execute the same line of code only the phone number in the code would be different for each line so if there were a thousand phone numbers it would have to execute a thousand lines of code one for each phone number. I would eventually like 4 people to respond but we’ll get to that later.


#6

Well, I gave you code to do that. You just attach it to the submit button. But, of course this is SPAM calling, so it is not legal in the US. Did you test my code? Just make it one page and run it on your server and see what it displays. You would need to add in code to only run four at a time if you have four lines.

Not sure if this helps you, but without sample code or more info, it is hard to show you code for it…


#7

Well, I gave you code to do that. You just attach it to the submit button. But, of course this is SPAM calling, so it is not legal in the US. Did you test my code? Just make it one page and run it on your server and see what it displays. You would need to add in code to only run four at a time if you have four lines.

Not sure if this helps you, but without sample code or more info, it is hard to show you code for it…


#8

Would it be incredibly rude to ask for a conference call or Skype call or even phone if possible? No need to worry about spam calling these are all opt-in numbers


#9

Not rude, but, heading to bed as it is 1:30 AM here… I am in the US…

So, Do you want help creating a webpage to input numbers and keep them and dial them out using a URL?
Do you have a dialer system set up already? Do you have the database of numbers set up or do you want
to input them on your webpage?

We now know you want to dial out numbers, and it is not spam, so how are you keeping your numbers now?
More info and we can help you. This is a public site and we can help. If you want to hire a programmer,
we have a section on that where you can post for it. But, this sounds simple, just not enough info as yet…


#10

The text format that the carrier gives us is this:

https://sms.teleapi.net/sms/send?token=[API Token]&source=[Source]&destination=[Destination]&message=[Message]

I have inserted all of the information manually and it works.

I would now like to use the page like I showed you to enter an entire list of numbers by copy and pasting and then it will one by one produce that script with all the same information except the destination number will change. It will send out a message to each one of the numbers that I load into the list

Example:

If I load 3 numbers in then I want it to execute that command which I posted with just the numbers that I loaded one at a time so it would produce three commands. One with each of the numbers I had loaded


#11

Okay, I will drum up a script to do that in the morning… Off to bed now. So, that would be in about 8 hours from now… Got to sleep for a bit… I think that should be simple enough to work out for you.

Night for now…


#12

I look forward to it and hope that everything works out. If it does would you be open to the option of perhaps being on call for payment? I’m sure this is just the first of a few things we can improve upon.


#13

And what values do you need for the source, destination, and message values?


#14

https://sms.teleapi.net/sms/send?token=e9cf7e33-0c00-4eb5-94fb-7ae060fa4329&source=8445972807&destination=[Destination]&message=This is The National Health Enrollment Center. You are still eligible to enroll in an affordable health insurance plan. Call 844-597-2807 now to speak with a licensed agent

The destination is the variable that needs to change to each number on the list.


#15

That is easy enough. Now where do the numbers come from?


#16

I would like to load them into a field with a submit button like the one on the page I showed you.
A list of probably up to 2000


#17

Currently we export the data from our dialers when a client/prospect asks or agrees to reminders and notifications of offers or whatnot.


#18

So, they are not currently being stored in a database or file somewhere?


#19

In a TXT file, but no they are not in a database
They can be though, I can put them in a list on the Vicidial server, it uses an SQL Server


#20

Well, it is far easier to do code when you don’t need the UI getting in the way… So, selecting everyone that you want out of the database, you can just loop through it and make the calls like Ernie mentioned.