I would like to integrate chat functionality in my PHP website with Google Chat API,
I checked the link https://developers.google.com/hangouts/chat/reference/rest
Here, with these APIs, I want to create rooms between two users, sending messages to each other in a room, but I did not find the right way to do so. are there any preferable docs? (I reviewed official docs, seems not much useful)
If you want to create rooms between users, I recommend you to take a look at spaces. They are the Chat API equivalent of a chatroom. In fact the resource rooms is a special subset of spaces. Then, if you want to create a space you only need to work with spaces.message.create(). Please keep in mind that Chat API is geared towards bots, and bots don't create chatrooms (they are invited by users to existing chatrooms). Feel free to comment on my answer if you have any doubts.
Related
Firstly this is my first question so I apologize if it not up to standards.
TL:DR -
I need to be able to get a notification of a Paypal transaction with the amount, and message, if any to an IRC bot. I am thinking about a webpage to take the transaction and notify the bot. I was hoping to use PHP for the webpage and this for the IRC bot: willie.dftba.net - An open source Python IRC Bot.
Long Format -
Context:
I am attempting to create a webpage that will take a Paypal transaction, then send a notification containing the amount and the message the user left(if any) to the IRC Bot.
The reasoning behind using a webpage over having the bot query the Paypal API directly is to avoid spamming Paypal while at the same time reducing the communication to a notification only when an event occurs.
The webpage will likely be running on a hosted webserver that I have little control over. I am familiar with PHP, my Javascript is not so great though.
The IRC bot has not yet been created, I was hoping to utilize willie.dftba.net for the bot, it's Open source and in Python. The bot will be running on a Windows machine most likely. Other options for IRC bots should probably be left to the comments. The bot will be doing other things outside the scope of this question. Though this is a critical function for the bot.
Answers I'm looking for:
What sort of technologies or libraries for the languages I am trying to use can help me achieve this as simply as possible? Please state why.
Suggestions that are within the scope of this question:
Using different technologies, languages, or APIs than I mentioned if it will make the job easier/faster. Please state why.
Why am I asking?
I am asking this question because there seems to many possible technologies or APIs I could utilize but I am not experienced enough to ascertain which route I should head down. I am honestly at a loss right now.
Background on my Knowledge & Experience:
For web technologies, I am familiar with HTML, PHP CSS, & a little Javascript.
For programming languages I have taken a few classes covering basic C++, Visual Basic .NET, and some Java.
I have messed around with Python a little over a decade ago when modding a game.
I have created, or helped to create a dozen or so smaller websites. I have used things like Jquery before but in an extremely limited fashion, my PHP is much stronger than my Javascript.
I have made a few simple command line C++ & Java programs as learning exercises.
I have made many simple VB.NET applications and 3 practical use, but small applications.
Research I have conducted:
I have searched Google, and here for possibilities, and have several links that I have looked through. While I must admit I have not read every single word on every single link, I have read a fair portion and skimmed a lot of the rest. And clicked on many links within the pages I am about to reference here. For the sake of not posting the entire internet, I am only posting the starting links.
After typing this all up, I discovered it will not let me post more than two links so I have had to alter these links.
willie.dftba.net
php.net/manual/en/book.sockets.php
socket.io
www.npmjs.com/package/socket.io
stackoverflow.com/questions/6398887/using-php-with-socket-io
www.htmlgoodies.com/html5/other/create-a-bi-directional-connection-to-a-php-server-using-html5-websockets.html#fbid=XmAMX7ESMm7
stackoverflow.com/questions/14418950/broadcast-notification-to-multiple-users-at-the-same-time-php-mysql-ajax
cometdaily.com/maturity.html
stackoverflow.com/questions/12284565/how-to-communicate-between-a-php-and-a-c-application-through-a-socket
davidwalsh.name/nodejs-irc
sourceforge.net/projects/phpsmartirc/
Final Thoughts:
Thank for reading this question and devoting some of your time and energy to this question, it is highly appreciated! I really hope I have been thorough & specific enough.
You've been pretty broad with your questions, so I'll be broad with my answer.
I would recommend sticking with PHP and setting up an Instant Payment Notification (IPN) solution for your PayPal account.
That will send POST data about any transaction that hits in your PayPal account in real-time. You can use it to automate tasks based on payments, refunds, disputes, cleared payments when they're pending, etc.
There are lots of good IPN packages for PHP available on GitHub/Packagist. If you happen to be working with WordPress, take a look at my PayPal IPN for WordPress plugin, and on that note, if you are using WordPress I'll assume you're using WooCommerce, so I'd also take a look at my PayPal for WooCommerce plugin.
For API calls, I would recommend taking a look at my class library for PayPal. It will make any API call you need to make with PayPal very quick and easy, and it is also available on GitHub and Packagist.
Those tools should give you everything you need to get any PayPal task you need done.
My company run ads on Adwords for quite a while now.
We provide a special kind of Construction Services.
Since our solution is very complex, some people dont quite understand what we are offering but convert into a contact anyway. This happens because:
1 - They dont read the FAQ, neither the website content.
2 - They are just collecting quotes for a service they need, and just Copy + Paste their question on our Contact Form.
3 - Our service name is very hard to target correctly since the keyword is kind of "open to interpretation" and has a bunch of meanings.
I could exemplify with the keyword but i dont know the exact translation to english.
Anyway, we receive a bunch of Contacts. I can track conversions on AdWords and Analytics, i can see wich campaings, keywords, placements, etc are perfoming well, but here is what i really need:
I need to know where THAT GUY that wrote that stupid question came from.
I need to be able to associate AdWords data with the E-mails i receive trough the Contact Form.
I need to be able to, at the end of the month, collect those 1.000 contacts from my CRM wich are classified as "bad contact" and check where they came from. I could for instance find out that a specific placement in Display Network simply suck, i get conversions, but those conversions are bad. Or maybe a specific keyword simply dont work, people always mistake that for something else.
I need to be able to look at this very good contact that came in and trace it back to exactly what campaign originated it, what keyword, what search term, etc.
At my disposal i have, of course, AdWords resources - i looked everywhere i could not find how to do it with Adwords only.
I also have a CodeIgniter / PHP Website. Maybe there is a way to read AdWords / Analytics cookies.
I also have knoledge to mess up with the Adwords API, in case that helps.
Any help from you guys is welcome.
Sorry for my english - not my first language.
Best regards.
You might try using eCommerce module for analytics. Every time when the conversion is performed, create a new product and fill the fields (SKU, Price, Order ID, etc.) with data you need to identify contact
I just have a quick question to see if this is possible with the Google Adwords API or if there is a better solution / service out there that I could use.
What we need to do is generate a Google Adwords report each month with some statistics. We need the report to automatically pull the following things:
# of clicks
Cost
Average Ad Position
Top 5 Keywords Clicked
Then, it should also compare how it did from the previous month and then provide a graph of the past 6 months activity.
Is this all possible? I am waiting for the adwords login from my company so I can go in and request the key and play around with it but in the mean time I just wanted to ask and see what you guys think. Is something like this difficult or pretty straight forward? Is there maybe a service already out there that does something like this? This will be for over 100 accounts.
What do you guys recommend?
All of this is possible using the API but the API may be overkill. The automated reporting features in Adwords are very customisable and you can have them generated at regular intervals and emailed to you with the data you mention.
You can find info on setting them up here: http://adwords.google.com/support/aw/bin/answer.py?hl=en&answer=12299
I used to have a number of python scripts that would generate all sorts of pretty graphs from the early Adwords API. It wasn't until a few years later I realised the automated reports could do it all and much more.
Try AdWords Scripts. With those, you could write a 30-line piece of Javascript, have it dump the output and graphs into a Google spreadsheet, and automatically execute once a month while emailing you about it. They have a few tutorials on the website that do very similar things.
I am interested in working with friends via the internet on a fantasy world map. One of the things I want to do is host an image of the map online and allow us to insert push pins into the image that would then be associated with infoboxes.
I don't want to resort to using the Google Map APIs mainly because this is something I want to just share among friends and not publicly. Terms of usage for the APIs state we would need to make the implementation available for everyone.
This seems simple enough yet I've no idea how to do this. I looked into image maps, but that requires constant updates to the html markup itself. I just want to insert/delete/edit pushpins and infoboxes on the image and through our site itself.
Can someone help me get started?
You may want to check out openLayers. http://openlayers.org/dev/examples/
I don't want to resort to using the Google Map APIs mainly because this is something I want to just share among friends and not publicly. Terms of usage for the APIs state we would need to make the implementation available for everyone.
Available, but that doesn't mean you have to e-mail every Internet user in the world to announce the site. You can't password protect the page that's using the Google Maps API, but you can name it http://example.com/you-will-never-guess-this-url.html and just send the link to your friends.
This is only partially what you are after, but may help.
Check out SpryMap. It will provide you with the "scrolling map" effect. Unfortunately, it doesn't provide anything to do with pushpins. However, if you are decent with CSS & JavaScript, it shouldn't be too difficult to implement.
I know about code development using PHP but not much about modern day web APIs. I want to implement a framework of APIs like Facebbok connect. Myspace connect, Google connect etc for 2 purposes:
1) Users can upload photos to their photo album
2) Other websites can login users using authentication from my site (similar to facebook/Google connect).
So firstly, what is the underline technology / server requirements etc to implement this? Can i use PHP? Then what other schema changes are required? I see facebook has public API keys that other developers use for this. But I am not sure on the implementation.
Probably the best place to start is to read up on http://oauth.net/. I know there are several OAuth implementations in several languages like Java and .NET. I'm confident there is something for PHP (since Facebook is primarily PHP). Just have to hit the google.
I disagree. People use facebook because there is no option out there. I use it too (purely to show off to my friends what a loser I am on weekends when I sit at home and keep posting updates of how awesome my day was). But if i find a better network (not in terms of features but pure trust, a social network that actually respects its users and the information people share, I will switch. Creating an account is no big deal, takes 1 minute. But trust is a life time thing. Once broken it rarely ever comes back. I see it like a relationship. When i created my facebook account 4 yrs ago i was in a relationship with facebook. They betrayed me time after time, year after year and I have no respect for it now. It is like that partner who has cheated on you so many times that today you wish it would just die and fade away. If I find something better and I am out, and all my friends whom I know well enough share my views too. So you will get users, no doubt.
I like your idea of trying to create something, this is how we grow. If everyone thinks like these other people here then there will be no progress in the world. Everyone will be a follower only and not a leader. Google would have said there is a yahoo and microsoft which is huge let's just follow them. But they took their time, fine tuned their model and today they are bigger than these these brands. Of course it is a different story they are a bigger offender of being a big brother than facebook but with power, 99% of the time comes these unethical minds who want to take over the world. If you can fall in the 1% who can have power and remain true to your users, people will follow you in a true sense.