Skip to content
Advertisement

Tag: linux

PHP passing $_GET in the Linux command prompt

Say we usually it access via How do we execute the same on a Linux command prompt? But what about passing the $_GET variables? Maybe something like php -e index.php –a 1 –b 2 –c 3? I doubt that’ll work. Answer Typically, for passing arguments to a command line script, you will use either the argv global variable or getopt:

How do I throttle my site’s API users?

The legitimate users of my site occasionally hammer the server with API requests that cause undesirable results. I want to institute a limit of no more than say one API call every 5 seconds or n calls per minute (haven’t figured out the exact limit yet). I could obviously log every API call in a DB and do the calculation

Compile a PHP script in Linux

I know PHP scripts don’t actually compile until they are run. However, say I want to create a small simple program and compile it to a binary without requiring the PHP binary. How could I do this? I’ve seen a few IDE’s out there that would do this, but either they are all for windows or the Linux versions don’t

Advertisement