Send Whatsapp attachment using PHP - php

Is there a way that I can send a whatsapp attachment using PHP or a Laravel package?
And is it official API?

You can only write a wrapper for the web interface! There's no API!

First, it is needed to connect and get the permission of WhatsApp then in the next step, sending a request according to your requirements.
You need to fetch the receiving data from a delegator.
I could find CHAT-API which specifically designed for manipulating the data through the WhatsApp.
Construct your initial connection then register your desired number and follow relevant published Wiki receiving a message .

Related

Google Calendar APIv3 - how to handle incoming resource change notification using webhook?

Using Google APIv3 I wish to synchronize my PHP webapp calendar with Google Calendar by creating a notification channel using a webhook on my server. As per the documentation of Google I did the necessary preparations (defining and validating webhook, creating the notification channel) in order to receive status update information from the Calendar using the watch method.
My issue is that I cannot figure out what to do with the incoming information - as per my understanding and as stated in these docs, my webhook should be notified not only about the fact of change, but it should get the actual change as well so I can avoid unnecessary processing. Unfortunately, the know-how on receiving these notification are quite vague and I cannot find where to look for the nature of change made to the Calendar resource.
Am I missing something? Do I have to get the resource using the identifier returned to the webhook and "manually" check differences or there is some technique I can use to update (or even more preferred patch, but I also do not understand how to do that in PHP) the changed Calendar resource on my webapp side? Is PHP even a suitable language to implement this?

Sending SMS using API using flowroute API

I want to Send SMS using flowroute API. I want to use PHP or Laravel Framework. I didn't get any good tutorial about it.
You know, that you just need to read and click a littlebit? The address you refered to, shows PHP-examples. On the target-github-page you can find the text "To work with the SDK, please read and follow the steps in the Flowroute PHP Library v2.". What is the problem?

Poloniex push api

I am interested in writing some basic php to interface with the Poloniex push api.
Their website provides the following info:
https://poloniex.com/support/api/
A php wrapper can be found here:
http://pastebin.com/iuezwGRZ
From what i can determine there are three APIs being push, public and trading. The public and trading APIs provide functions that can be passed parameters etc. The push api stumps me totally as i cannot determine how it works.
The first link above states the API pushes live data and different feeds can be subscribed to.
My questions are:
A) How can php receive a live stream of data?
B) How do i subscribe to a feed?
I may have misunderstood the oush api and my apologies in advance if this is the case.
Edit1:
I believe i need a WAMP client to connect to a WAMP router such as Minion.
https://github.com/Vinelab/minion
Edit2:
Node.js example
http://pastebin.com/dMX7mZE0
The push API is based on Websocket protocol.
Initially you need first to make a connection to the websocket server,
after that you need to register to a data stream (price update stream for example), after that as soon as the server make an update to something (a price ), all connected clients who where previously registred to it will synchronously received the updated price
Finally you got the last price without the need of doublecheck at regular interval if the price has changed

What's are good Twitter PHP libs to send a message to new followers?

I am looking for a good PHP based lib to send a message to new followers. Probably it's already done. I think it must work as a twitter client and not around OAUTH2 authentication.
Here is Twitter's list of PHP API's
http://dev.twitter.com/pages/libraries#php
You will have to use OAUTH2, otherwise you will not be able to send a message to followers.

How to update a mysql database via SMS text messaging?

I want to add an additional functionality to a CMS I am making that will allow users to add content to a site via text message. The user should be able to upload an image and add text and send the message to a number which when received will update the database accordingly.
Can this be done, and can it be done via PHP because that's the only language I know? Also what would be the general outline to achieve such a thing?
You have to find a SMS gateway that supports "incoming" of SMS. Click-a-tell is generally the one people choose because of their API and documentation, they aren't free though. If you do a quick Google search for "SMS Gateway" you'll find plenty of other solutions.
Once you choose the gateway you want to go with, the rest of the process is easy. You would just handle the SMS as a regular request into your application.
Hope that helps you get started!
Use one of the many SMS gateways out there like Twilio (whom I work for, but loved before I was an employee) which has a really simple API and great documentation. There are tons of PHP examples. When you receive a message, a simple POST request is made to a URL you specify with parameters for To, From and Body. Also if you return text from the URLs you use to receive messages you can respond back to them. You can also initiate outbound SMS from the same number using the REST API.
Twilio does not currently support MMS (needed for your image uploading requirement) and is not free, but you only pay for what you use at $.01 per message.
Completing the answer by Raphael Caixeta, I recommend that you use the standalone PHP binary to run a pre-determined script, which parameters you'll get from the SMS/MMS. This way you can separate the two process:
1) Make a script and test it by running it through the command line.
2) Implement the SMS/MMS receiver software so that it parses the messages and runs the first script with custom parameters.
You can use a GSM/3G modem (or dongle) to receive SMS messages. And this sms software can read those messages from the modem in real time and put them automatically in your database.

Categories