Tag Archives: api

API based on user IP address

Questions: I developed an API to get all the data. The site do not have a user registration system or anything to identify the user making a call to the API. If I could identify the user making the call, whenever someone misuse or attack the API I could even ban his IP. I’m thinking… Read More »

Helping using JSON for an API

Questions: I don’t really understand how this API is supposed to work, as I’ve never worked with JSON before. The documentation doesn’t give any examples, but it says it the end-points in this API support both POST and GET operations, returning JSON. My question is, I’m not sure exactly how to implement this, let’s say… Read More »

How to fix 411 Length Required error with file_get_contents and the expedia XML API? [closed]

Questions: I am doing the online hotel booking using xml api(php) project.When i am working in the reservation code it shows error of the following “Warning: file_get_contents(https://…@gmail.com</email><firstName>test</firstName><lastName>smith</lastName><homePhone>8870606867</homePhone><creditCardType>CA</creditCardType><creditCardNumber>5401999999999999</creditCardNumber>….</HotelRoomReservationRequest>) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 411 Length Required” its my code $context = stream_context_create( array( ‘http’ => array( ‘method’ => ‘POST’, ‘header’ => “Content-type:… Read More »

How to securely connect to a web api from a AngularJS site

Questions: Being relatively new to web development, at least using client side technologies such as the AngularJS framework, I need to resolve a few queries before I can start my latest project. I am writing an application using the AngularJS which reads/writes/updates data in a database. With javascript being client side I have chosen to… Read More »

How do I make Win32 API calls from PHP?

Questions: I know that I can consume COM components but is there a way to directly call into the Win32 API’s (user32.dll, advapi32.dll etc) from PHP or do I need to wrap in a PHP extension or COM object? Answers:

GAPI: Failed to authenticate user. Permanent fix PHP [closed]

Questions: I am trying to fetch content from the GAPI it works sometimes but the other times it throws this error: Exception GAPI: Failed to authenticate user. Error: “https://developers.google.com/accounts/docs/AuthForInstalledApps “ I browsed through all the answers but couldn’t find a solution. I tried using both of these links previously: https://accounts.google.com/DisplayUnlockCaptcha https://www.google.com/settings/security/lesssecureapps It used to work… Read More »

how to post on google plus pages through api?

Questions: how to post on Google+ pages through API using php while searching for Google+ API got Google page API ( https://developers.google.com/+/api/pages-signup ) which allows user to post on Google+ pages but to white list this API need to apply for Google+ page API i am not getting any documentation for Google+ page API (how… Read More »

Execute Google Chart API (Javascript) in php file

Questions: I am creating a mail in php, in a wordpress plugin, and would like to include an image created by the google chart api. I tried the following: <?php $message.= <<<HTML <script> google.charts.load(‘current’, { ‘packages’: [‘corechart’] }); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ [‘Year’, ‘Sales’, ‘Expenses’], [‘2013’, 1000, 400], [‘2014’, 1170, 460],… Read More »