0

I would like to run a script in a google cloud server using a local HTML page.

To be more clear the steps would be:

  1. open a local HTML page on my local computer.
  2. push a button that triggers a script in my google cloud server.
  3. the script creates a file in the server that I can download pressing another button.

I'm new in this field and I don't know where to start.

How do I connect to the server via HTML? (PHP?, Javascript?)

How does the authorization process work?

Vikrant
  • 4,920
  • 17
  • 48
  • 72
steT
  • 99
  • 1
  • 9
  • try reading PHP tutorials and then work with Google cloud PHP SDK – Gntem Apr 26 '17 at 08:50
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. – Vinz Apr 26 '17 at 09:29

2 Answers2

0

There are several languages and strategies that you can use.

You can use locally Javascript or PHP (it needs installation and configuration) that will allow you, for example, to make an HTTP request (it may also be another protocol), to a script (that can be in PHP or Javascript or others) on the server, which, upon receiving the request, processes and generates a file for a specific path.

Then on that other button you make a request to that path to download the file.

My suggestion is to choose the languages and implement with these to understand the process.

foxtrot
  • 1,056
  • 1
  • 8
  • 24
0

Create an HTML page, put a button.

Attach a function to button onClick to send an Ajax request That would cause cross server request challenge for you down the road..

You can simply put a URL from your local web page styled as a button to your Google Cloud hosted application.

Create the file on the server side and you can set an HTML header Content-Disposition: attachment; filename="results.csv" to make a file downloaded to the user end.

vishva8kumara
  • 353
  • 1
  • 3
  • 15