diff options
author | Anton L. Šijanec <sijanecantonluka@gmail.com> | 2020-04-10 19:23:33 +0200 |
---|---|---|
committer | Anton L. Šijanec <sijanecantonluka@gmail.com> | 2020-04-10 19:23:33 +0200 |
commit | d46b7e26b28501a43dc0a6851b1eb2a84fae5e70 (patch) | |
tree | b04551f0046c3b5012190c5fb08752a1da161c76 /bettereveryloop.php | |
parent | dodatek (diff) | |
download | oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.tar oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.tar.gz oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.tar.bz2 oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.tar.lz oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.tar.xz oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.tar.zst oldredditclient-d46b7e26b28501a43dc0a6851b1eb2a84fae5e70.zip |
Diffstat (limited to 'bettereveryloop.php')
-rwxr-xr-x | bettereveryloop.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/bettereveryloop.php b/bettereveryloop.php index 067a549..90dac79 100755 --- a/bettereveryloop.php +++ b/bettereveryloop.php @@ -1,15 +1,17 @@ #!/usr/bin/env php <?php // how to write ugly code - if ($argc != 4 ) - exit ($argv[0]." username password subreddit"); - require_once ("main.php" ); - $o = new oldredditClient( ); - $o-> setusername ($argv[1] ); - $o-> setpassword ($argv[2] ); - while (1 ){ - $o-> setflair ($argv[3] ); - sleep (5 ); + if ($argc != 4 && $argc != 5 ) + exit ($argv[0]." username password subreddit link" ); + require_once ("main.php" ); + $o = new oldredditClient( ); + $o-> setusername ($argv[1] ); + $o-> setpassword ($argv[2] ); + while (1 ){ + $o-> setflair ($argv[3] ); + if ($argc == 5 ) + $o-> setflair ($argv[3], null, null, $argv[4] ); + sleep (8 ); } // reddit is max 30 requests per minute tho ?> |