Is there any way to call my website to receive some data about it?
For example: I connect my phone to my PC and call it from another cell phone and then i press 1 and it will tell me how many users online or something like that?
The short answer is no, the long one is yes this is possible but for this functionality you would need a VERY expensive call system to be installed that interfaced with your site.
Related
As you know,google is blocked in China. Now I want to put a php search function in my website for user to search by a keyword and get result from my website and more important, from both two search engines, google and Baidu. I have already get done with baidu. But I can get done with google.
Here I have an idea: since my hosting is in mainland China, I can get another vps(like hostus) in USA, when some one search in my webisite, I can let program send a command to this second vps and let it do the specified research using google and send right back the result to my local vps.
is it possible? I know google has a way to identify robots. do you have any great idea to solve this? I want my user search a keyword and get result page on my website showing a website search, a baidu search and a dreaming gooogle search.
Thank you!
I have a client that wants to take orders via an online form, with the idea being that an order can be submitted and stored in a database via my application while simultaneously generating an invoice on submission in QuickBooks.
How do I do this in PHP when the person entering in the order is not the client but a client of the client? It seems like Quickbooks uses Oauth tokens and a javascript library to generate them to connect a company to an app, but I'm simply writing a backend for one company and want that backend to create invoices when saving an order. How do I think about this?
I'm not interested in anyone having to hit a button that says "connect to quickbooks" especially not the person filling the order because again, that person is a customer and doesn't need to know about the internals of the customer's invoicing system.
I just really want to use the Accounting API to generate invoices. Is there no way to simply link my backend to my one company directly in the Quickbooks SDK configuration and achieve this, or do they need to use a javascript library to get tokens. I'm unclear about what direction I should be going in and don't want to waste time with a client-side library if I don't need it to do backend logic.
Here's some example code that does exactly what you're looking for:
https://github.com/consolibyte/quickbooks-php
Along with a quick-start guide:
http://www.consolibyte.com/docs/index.php/PHP_DevKit_for_QuickBooks_-_Intuit_Partner_Platform_Quick-Start
Also see notes about your comments below -- you're on the right track, you're just misunderstanding how OAuth works:
It seems like Quickbooks uses Oauth tokens and a javascript library to generate them to connect a company to an app, but I'm simply writing a backend for one company and want that backend to create invoices when saving an order.
Correct, Intuit uses OAuth, and a little Javascript thing to kick off the OAuth process.
I'm not interested in anyone having to hit a button that says "connect to quickbooks"
Someone needs to hit this button... BUT only ONE PERSON needs to hit the button ONCE, EVER, and then NEVER again.
The owner of the company (e.g. your boss) needs to click the button ONCE, which gives the OAuth creds (and the realm ID) to you. Once your boss has done this ONCE, then you have the creds to use forever, for all of the actual customers.
Your customers (e.g. the people actually checking out/placing orders) DO NOT click any buttons, nor do they see or have any idea at all that you're even using QuickBooks.
just really want to use the Accounting API to generate invoices.
Cool, you can totally do that!
Is there no way to simply link my backend to my one company directly in > the Quickbooks SDK configuration and achieve this, or do they need to use a javascript library to get tokens.
Follow the quick-start above. It should take you about 15 minutes to get a working OAuth connection, and then you never need to use the client-side stuff ever again.
You only need to authenticate every 180 days btw.
If you use the reconnect script, you only need to authenticate ONCE, and can automatically renew the tokens every 180 days, no user-interaction required.
https://github.com/consolibyte/quickbooks-php/blob/master/docs/partner_platform/example_app_ipp_v3/reconnect.php
Well with the realm_id for example, I don't understand how that relates to ouath.
The realm ID is just a unique identifier for the particular QuickBooks Online company you're trying to connect to. Yes, you need to store it. If you use our libs, this is done for you automatically.
I guess I don't understand if I'm developing for one client why can't I just get their realm_id from them and then keep using it rather than making them do some form of authentication?
Again, they only have to authenticate ONCE. That's Intuit's way of giving you the realm ID and credentials you need to connect. Once you've done it ONCE, you never need to do it again. It takes all of about 30 seconds.
If they were to just give you OAuth creds without any authentication, it would be a gigantic security hole. If you read the Wikipedia article on OAuth it talks in depth about this, and the goals of OAuth.
Okay I think I get it, so they have to authenticate once every 180 days?
Once every 180 days, UNLESS you use a reconnect script, in which case they just authenticate once and then never ever have to worry about it again.
So I can store the token and the realm_id in a database before it expires and just use that?
Yes.
In this way my client can authenticate and then my scripts can generate invoices for them when their customers visit our website?
Yes!
i was wondering how could you implement or the logic if you like, sending the other user that the person thier chatting to is typing something, i know it something to do the chat textfield being empty or not! but i just wanted to kind of clarify! thanks
p.s. im trying to do this on an iphone app and using a php lanaguage when communicating with an api!! thanks
NSNotificationCenter should help you out on this. Read up on that and notifications. You would be able to detect keyboard events using that and hence work your logic out based on that.
Check out this question on detecting the change event for an NSTextField.
I am willing to implement website where will be top 10 best members' pictures or something like that. Before voting for pictures or uploading pictures people will have to register first. But how could I protect my website from multiple accounts? Store IPs to database? But will it help me while there thousands proxies out there? What should I do? Thank you.
edit: maybe I could make accounts paid, for examples 0.99$ for month via paypal and somehow do no let people register twice with the same paypal and IP? Is it possible?
Use a confirmation code that is sent to mobile no upon registration. and confirm it. like google.
You can't stop it, but you can make it difficult and do things to detect it like you said with the IP's.
You can get a lot of data from user, not only IP but also browser version, sended headers in request, even resolution etc. with javascript. Rosolve IP to region etc. But it's not simple to write a system that would search all of that data for similarities.
You can also set cookies or even do a little swf object with cashed some information on user local hdd.
You can send mail confirmation... and don't allow multiple users from the same mail!
This is fast and easy to implement :)
I have this idea where I want to allow someone to call a phone number from their cell phone, and then a website would display their caller ID. I want to do this in php, but I'm really not sure how. I'm pretty good with PHP and I'm assuming you need some kind of GSM modem attached to the web server to accept the incoming phone calls, but that's really as far as I can get. If anyone can point me in the right direction that would be great.
There are a couple of services that launched recently which allow you to accept phone calls using an API:
http://cloudvox.com/
http://www.twilio.com/
These are probably easier than trying to physically receive the phone calls yourself.
If you went for using a modem then you'd obviously need drivers for it and to program against whatever API those drivers exposed.
Either way, you're going to need a way to link the phone call to the session on the website - maybe generating a unique number for each visitor, or by getting them to input a sequence of digits when they call. The workflow would then look something like
User visits website
Website generates session ID, provides user phone number
User rings number
Call-handling software/script/etc executed by cloudvox/twilio API or modem drivers
Call is mapped to a session (by inputted number, phone number, etc)
Caller ID is associated with website session
User refreshes website or website auto-refreshes
Website displays Caller ID to user