server-side

Calculate driving directions using PHP?

久未见 提交于 2019-11-27 07:35:02
问题 For my application I need a server to calculate driving directions. The Google Maps API was designed for clientside use only, with a Javascript and Flash API. Is there any way I can run their API's server-side? 回答1: As I know it this isn't official and google doesn't support it but it works: $url = str_replace(' ', '%20', "http://maps.google.com/maps/nav?client=yourclient&output=json&q=from: ".$lat1.",".$lon1." to: ".$lat2.",".$lon2); $result = file_get_contents($url); $data = json_decode

Office 2010 server side automation in a Windows HPC Server 2008 R2 Environment

筅森魡賤 提交于 2019-11-27 07:24:13
问题 I am aware of of the infamous Considerations for server-side Automation of Office from Microsoft and it clearly lists products from the 2010 suite. However, today I was made to believe by an IT ops techie that Office 2010 does not suffer from the issues mentioned in that article and can be used without issues within a server environment. I have been unable to find any reference or supporting doc that would substantiate the claim. (I will follow up with him on this, however he must have been

How to Create an anti-request forgery state token In google+ server side sign-up

丶灬走出姿态 提交于 2019-11-27 07:23:05
问题 <?php require_once '/google-api-php-client/src/Google_Client.php'; require_once '/google-api-php-client/src/contrib/Google_PlusService.php'; session_start(); // Create a state token to prevent request forgery. // Store it in the session for later validation. $state = md5(rand()); $app['session']->set('state', $state); // Set the client ID, token state, and application name in the HTML while // serving it. return $app['twig']->render('index.html', array( 'CLIENT_ID' => CLIENT_ID, 'STATE' =>

Check if Javascript is Enabled (Serverside) with Rails

假装没事ソ 提交于 2019-11-27 06:53:24
问题 How would you check if javascript is enabled in Rails? So that I could do something like this in the views: <div> <% if javascript_enabled? %> <p>Javascript Enabled!</p> <%- else -%> <p>No Javascript</p> <%- end -%> </div> 回答1: You can detect it, but it isn't pretty. First, you need a new controller with an action that updates a timeout in the session: class JavascriptController < ApplicationController def confirm session[:javascript_updated] = Time.now end end Next you need to include a

When and how do you use server side JavaScript? [closed]

…衆ロ難τιáo~ 提交于 2019-11-27 06:22:16
Occasionally I search for some JavaScript help and I come upon the term "Server-side JavaScript". When would you use JavaScript server-side? And how? My experiences of JavaScript have been in the browser. Is there a compiled version of JS? Will Hartung There's the project Phobos , which is a server side JavaScript framework. Back In The Day, the Netscape web server offered server-side java script as well. In both of these cases, JavaScript is used just like you'd use any language on the server. Typically to handle HTTP requests and generate content. Rhino , which is Mozilla's JavaScript system

Android: Using server-side when working with Parse

醉酒当歌 提交于 2019-11-27 05:48:50
问题 Me and my friend are working on an app., and we wish to use Parse.com as our data base from which we can retrieve info. We can't decide what is the best way to access the data on Parse. For the sake of the example, our app. (i.e. client side) needs something stored on the Parse data base (say some number) - should it directly run the query using the Parse API, or should it make a request to a server side, let it retrieve that number from Parse, and send it back to the client? We know there's

Pagination: Server Side or Client Side?

做~自己de王妃 提交于 2019-11-27 02:52:38
What is it best to handle pagination? Server side or doing it dynamically using javascript? I'm working on a project which is heavy on the ajax and pulling in data dynamically, so I've been working on a javascript pagination system that uses the dom - but I'm starting to think it would be better to handle it all server side. What are everyone's thoughts? The right answer depends on your priorities and the size of the data set to be paginated. Server side pagination is best for: Large data set Faster initial page load Accessibility for those not running javascript Client side pagination is best

Start with node.js as a complete server-side newbie?

孤街浪徒 提交于 2019-11-27 01:57:30
问题 My main question is whether it makes sense to begin with node.js as a complete server-side newb. Is JS/node.js a good choice to start server-side web-programming from scratch? I do lots of frontend work, namely HTML, CSS and basic JS. I even wanted to start with Rails but always had the feeling that not knowing what is going on behind the curtains makes me completely uncertain about the framework - it was just too much "convention over configuration". My hope is to learn JS in general and

Send HTTP request from PHP without waiting for response?

≯℡__Kan透↙ 提交于 2019-11-27 00:42:25
问题 I want to have an HTTP GET request sent from PHP. Example: http://tracker.example.com?product_number=5230&price=123.52 The idea is to do server-side web-analytics: Instead of sending tracking information from JavaScript to a server, the server sends tracking information directly to another server. Requirements: The request should take as little time as possible, in order to not noticeably delay processing of the PHP page. The response from the tracker.example.com does not need to be checked.

Does JSONP require server modifications?

为君一笑 提交于 2019-11-26 20:08:00
问题 I understand that jsonp is a technique to get around the same origin policy. You basically refer to your json serving server endpoint in a script tag, because script tags are exempt from the SO policy. My question is: Assuming a server has an endpoint that serves up json, are there any modifications necessary on the server to make use of jsonp in the client? I think no, but want to be sure.... 回答1: Yes, JSONP is slightly different when it renders, so your server needs to support it. JSON