How to send SMS to mobile phones from website using PHP & Infobip API
ฝัง
- เผยแพร่เมื่อ 2 ต.ค. 2024
- In this video, we will learn how to send SMS to mobile phone from your website using PHP & Infobip SMS API
You may also want to watch:
How to send SMS messages from website to multiple phone numbers using PHP code
studio.youtube...
Wallpaper by Kevin MacLeod | incompetech.com/
Music promoted by www.chosic.com...
hi I'm having error but in code there no mistake and error is
Warning: Undefined array key "phonenumber" in C:\xampp\htdocs\sms\sendSMS.php on line 13
Fatal error: Uncaught TypeError: Infobip\Model\SmsDestination::__construct(): Argument #1 ($to) must be of type string, null given, called in C:\xampp\htdocs\sms\sendSMS.php on line 25 and defined in C:\xampp\htdocs\sms\vendor\infobip\infobip-api-php-client\Infobip\Model\SmsDestination.php:39 Stack trace: #0 C:\xampp\htdocs\sms\sendSMS.php(25): Infobip\Model\SmsDestination->__construct(NULL) #1 {main} thrown in C:\xampp\htdocs\sms\vendor\infobip\infobip-api-php-client\Infobip\Model\SmsDestination.php on line 39
It is case-sensitive. So phonenumber is different from phoneNumber. So check your HTML code. I'm sure you used phoneNumber in the HTML code
How did those php files are created can tell
just the way other php files were created. If you have done any
thing on php before, it should not be a problem.
Can you provide us source code?
Please join our community membership to have access to every source code in our videos.
How to join sir?
sir please how to fix this "Failed to download doctrine/deprecations from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:\Program Files\php-8.3.0\php.ini
Now trying to download from source"
Run the command again. Be sure you are using a stable internet connection.
thank u for your efforts bruh. we waiting for more videos@@syntax_flow
SMS message sent in my site but didn't receive to my mobile
Make sure you add your country code to the phone number.
...for example, if your phone number is
034567003333 and you live in the UK, you will input +4434567003333
@@syntax_flowyes sir I add country code
Great job sir!
Is it possible to send to several numbers at the same time, i mean maybe uploading an excel file and broadcast to all at the same time sir?
Yes, it is possible. All we need is to tweak the code a little bit.
@@syntax_flow how do we do this sir?
@@olatunjipelumi4671 I may have to create a tutorial for that soon when I have the time.
...note: SMS gateways only permit few free SMS. So you may not be able to test for very many numbers.
ok sir
@@syntax_flow
I am using visual studio
Even if i buy a plan, is this the code that i need? Or do i need to change the code?
This is all you need.
I used the code message sent is viewed on website but message is not delivered...when i check the status in website i'm getting errors1):579 i.e, REJECTED DESTINATION NOT REGISTERED and 2) REJECTED NETWORK how i can i fix this??
Based on the error, the issue is from the service provider.
NB: remember to add your country code to the phone number.
composer : The term 'composer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
You need to install Composer on your machine. Click the link below, look for the download link in the page to download and install.
www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=getcomposer.org/download/&ved=2ahUKEwjp_8nYjvODAxUqT0EAHZWDC48QFnoECCQQAQ&usg=AOvVaw0hifbxuQZySOtGjSzPWfJo
Hello, I just watched your video and followed the steps but I got this error Uncaught Error: Class "infobip\Configuration" not found. Please how can I fix it?
The error is likely from the first four lines. Crosscheck to be sure you typed those lines correctly.
Note:: it is case sensitive.
You need to do it in Laravel
This is so easy to follow. Thank you.❤
You are welcome
I am using visual studio c# and i want code to test and whether integration with web app work properly or not.
@@chinmayk2657 the example in this video is based on PHP.. It can also be done with C# driven website with little modifications here and there.
Can you tell step by step so that i.can integrate with app@@syntax_flow
Wow! It works! Thank you❤
what to do now please:
"your git was not found in your path, skipping source download"
Run the command again. Be sure you have a stable internet connection
What if i want send OTP verification integration for my website
@@chinmayk2657 it will work as well.
@@chinmayk2657 This expressly answers your question:
Integrating SMS with website
m.th-cam.com/video/z4UNScQSjKY/w-d-xo.html
I am using visual studio and can you please tell me - each and every steps involved.
@@chinmayk2657 it doesn't matter what you use, what matters is the code and it is clearly shown in the video.
quick question, do infobip only send messages to registered numbers from the infobip website??
I guess so because the messages they send routes through the recipient's country's network. So if the country is strict on SIM registration, the messages can only deliver to registered phone numbers only.
@@syntax_flow I just read about it at there website and it says since I am using the Free Trial version I can only send messages to numbers that are verified by infobip.
SMS message sent in my site but didn't receive to my mobile
It may take some time before the message is delivered. It depends on the service provider.
Account not provisioned for global one- or two-way SMS (code: 592) i get this error
This seems like a token issue. Confirm and try again.
do I need to by number to after upgrading my account?
@@syntax_flow
hi, i follow your code but there is an error wherein
Parse error: syntax error, unexpected ':' in C:\xampp\htdocs\SMS\sendSMS.php on line 18
and the line 18 is
$configuration = new Configuration(host: $apiURL, apiKey: $apiKey);
can you help me in this error?
Check the code very well. Ensure you have API KEY from the website as shown in the video
Please share this code
Please join our community membership to have access to every source code in our videos.
It seems the echo message is appear, but I didn't receive the message on my number, whats wrong with this?
Things to note:
1. Be sure include your country code with the phone number.
2. Check that you didn't activate DND on your phone number.
@@syntax_flow Thanks for the tips but can I ask how can I include the country code? It is from entering my phone number on the input field or should I do something in the code?
@@johnalbertadonisgatmaitan3495 it is through the input field. For example, if your phone number is
034567003333 and you live in the UK, you will input +4434567003333
@@syntax_flow Should I activate my Infobip account for this?
@@syntax_flow Oh I did it RN, I thought I could send a message to anyone else, but that isn't I added my number as a receipt on the website of infobip, right now I received the message, I registered my other number instead of the number that I want to use for receiving anyway thanks for this code this is very helpful hope you can do more about API. I appreciate this vids THANK YOU SO MUCH
Apakah bisa untuk menerima pesan juga?
Ya itu mungkin. Terima kasih telah menonton.
is it free sms sir?
Yes. But you have limited number of messages you can send.
please give me full code
Source code is for channel members
Can you give me the source code?
Source code is for community members. Please join our community membership
Great! Could you do one about emails from infobip API?
Noted.
Quick question how do I get the other files css, nbproject and images. The composer function i typed isn't working
nbproject was auto generated because of the code editor I used before I switched to VSCode. It has nothing to do with the code.
The CSS and images are just there to make the program look a little pleasing to look at.
You may need to reinstall the composer and check the code again to be sure you have not missed anything.
Make sure you enter your country code to the phone number.
@@syntax_flow yea just an update it worked- turns out the number i was sending to the network didn't accept it
@@edwardklem7718 Wow! Good to hear.
I thought of this yesterday, you did it today. Thank you for this video.
Glad to hear
it can send bulk messages?
No. You need to tweak to code to do that. I may make a video regarding that when I have the time.
Source code please
composer : The term 'composer' is not recognized as the name of a cmdlet, function, script file, or operable program.
You need to install composer on your system. Click on this link below to download and install.
getcomposer.org/
@@syntax_flow how to install?
@@syntax_flow how to install it please
I get this error - Unknown named parameter $host. Please help in this
Check the code very well. You seem to be misspelling some of the words. Note: it is case sensitive
@@syntax_flow I check everything still getting this error. Is there any source code link?
@@DharaKhandhediya is the error the same as you got before?
@@syntax_flow After update composer, now I get this error - Unknown named parameter $apikey
I used this version - "infobip/infobip-api-php-client": "^5.0" in composer.json file
It works! Thank you
You're welcome
❤❤❤
Very cool thank you
You are welcome
can you give source code and some guide
❤❤❤❤❤
Sir can you give me the full code, Please
Please join our community membership to have access to every source code in our videos.
How to join sir?
@@JogineSumariaClick on the link below to join.
@JogineSumaria Click on the link below to join.
When joining, pick the membership type that has access to all source code
th-cam.com/channels/jPCJpjdTXM3VwUUSIkwVCg.htmljoin
PLEASE FIX THIS
failed to download doctrine/deprecations from dist: The zip extension and unzip/7z commands are both missing, skipping.
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
Now trying to download from source
In GitDownloader.php line 82:
git was not found in your PATH, skipping source download
This error usually occurs due to network instability during download. Please repeat the download process.
is it free
Yes. But if you need to send to thousands of numbers, you will need to pay.
@@syntax_flow thanks
Can I get your contact sir
@@TH-camMFlix you can send me an email via the email address on this channel bio.
this is nice.. work for me
Glad to know.