GoogleCloudPlatform / php-docs-samples

A collection of samples that demonstrate how to call Google Cloud services from PHP.
http://cloud.google.com/php
Apache License 2.0
964 stars 1.03k forks source link

Add code signing-urls-manually #1092

Open marcofbb opened 4 years ago

marcofbb commented 4 years ago

Hello, I have translated the python code of this page https://cloud.google.com/storage/docs/access-control/signing-urls-manually to PHP

Could you add it to the documentation? I do not dare to request a pull

Link code PHP: https://gist.github.com/marcofbb/97c875bb51f2dc9740588f8e550aac77

Thanks

bshaffer commented 4 years ago

@marcofbb a Pull Request is the best way to contribute code. Why do you "not dare"? Here is some documentation on how to do this.

bshaffer commented 4 years ago

Also, I see you've defined two functions in that gist. One is for generate_signed_url_google and the other is for generate_signed_url (in the comment)

Which of these are you proposing we use?

marcofbb commented 4 years ago

Also, I see you've defined two functions in that gist. One is for generate_signed_url_google and the other is for generate_signed_url (in the comment)

Which of these are you proposing we use?

Hello, First generate_signed_url_google(); there function is equal to function in docs with Python

I have to make an improvement, which is to use the PHP class date, so as not to edit the general timezone of the php running

The function is translate python to PHP of code: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/storage/signed_urls/generate_signed_urls.py

Greats

marcofbb commented 4 years ago

@marcofbb a Pull Request is the best way to contribute code. Why do you "not dare"? Here is some documentation on how to do this.

Because I don't know which path to upload it to, the path for the PHP example code is not generated for this