Find Jobs
Hire Freelancers

PHP function modification for a WP site

€8-30 EUR

Abgeschlossen
Veröffentlicht vor mehr als 3 Jahren

€8-30 EUR

Bezahlt bei Lieferung
I need this for a student website project. I am using Google Sheets to collect data. These data can be then dynamically edited by other users at any time. I have been using the function below (source: [login to view URL]) that I included in my [login to view URL] file to read and display values from the individual Google Sheets cells on my website: function sheet_value_shortcode($atts) { $API = 'XXX'; $google_spreadsheet_ID = 'XXX'; $api_key = esc_attr( $API); $location = $atts['location']; $get_cell = new WP_Http(); $cell_url = "[login to view URL]$google_spreadsheet_ID/values/$location?&key=$api_key"; $cell_response = $get_cell -> get( $cell_url); $json_body = json_decode($cell_response['body'],true); $cell_value = $json_body['values'][0][0]; return $cell_value; } add_shortcode('get_sheet_value', 'sheet_value_shortcode'); Then, I used the shortcode [get_sheet_value location="Cell Location"], e.g. [get_sheet_value location="Sheet2!C4"], in my WordPress pages to refer to the cells within the spreadsheet. The problem began when my pages contained hundreds of those shortcodes, probably by exceeding the number of allowed API calls set by Google. Therefore, I would need the above code modified in a way that it would load the Google Sheet, for example, once a day and save a fresh copy of the data somewhere on the server. Then, every time a page containing the shorcodes is loaded, it reads from the saved version of the data saved on the server instead of the actual Google Sheet. P.S. I am not very skilled at writing PHP code. Thanks in advance!
Projekt-ID: 28200942

Über das Projekt

1 Vorschlag
Remote Projekt
Aktiv vor 4 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
Hello, Your project description really caught my attention. I'm extremely interested in your project because of it's related to WordPress I am very confident to fullfill your requirement asap. I'm an expert in making new plugins for wordpress. I've great experience more than 10 years in this field. Google Api have access limited. Your way is perfect to perform action. Yes possible to check once in a day and save updated value to local server. Show value anywhere by shortcode from saved one. Well let's discuss further via chat. Thank you Jaypalkumar (Plugin Expert)
€50 EUR in 2 Tagen
5,0 (11 Bewertungen)
4,0
4,0

Über den Kunden

Flagge von SLOVAKIA
Lazany, Slovakia
5,0
1
Zahlungsmethode verifiziert
Mitglied seit Nov. 17, 2020

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.