# Best practices for Spark Variable update frequency?

**URL:** <https://community.particle.io/t/best-practices-for-spark-variable-update-frequency/12148>\
**Category:** General\
**Created:** [May 28, 2015, 12:59pm UTC](https://community.particle.io/t/best-practices-for-spark-variable-update-frequency/12148 "2015-05-28T12:59:54Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [June 4, 2015, 2:18pm UTC](https://community.particle.io/t/best-practices-for-spark-variable-update-frequency/12148/19 "2015-06-04T14:18:22Z")

</div>

Garrett @wgbartley has a PHP proxy posted here in the forum that works if you have your own web server.

> [@Simple Spark PHP Proxy](https://community.particle.io/t/simple-spark-php-proxy/4073):
>
> There’s at least a half dozen PHP proxies/wrappers in the forums already, but I wanted one that was a little more flexible. This one should take whatever GET or POST request you throw at it, append your access token, and then pass it on to the Spark Cloud. The code is pasted below, but is also tracked in [this gist](https://gist.github.com/wgbartley/11337650). \<UPDATE\> I have added an updated version that’s a little more transparent if you are using Apache mod\_rewrite. \</UPDATE\> proxy.php without Apache mod\_rewrite: \<? // Set your acce…

Another way to go is to write a javascript/html web page that asks the user to log in to their Particle account to get a token via the Particle API. That was too much work for the tutorial but it is quite do-able for a real app.

---

_[View the full topic](https://community.particle.io/t/best-practices-for-spark-variable-update-frequency/12148)._
