PHP script to Tweet random line from a file
Budget: $10 – $75 USD
I’m working on a project to collect movie quotes and want to attach a movie quote of the day Twitter account to it. I'm looking for someone to create that PHP script for me.
It should be a standalone PHP8.1 script (no frameworks) to run on a Linux server that is called by cron once a day. It then has to pick a random Tweet from a file in the same directory on the server and post it to the Twitter account using the Twitter v2 API.
I was thinking the quotes could all be stored in a UTF8 CSV file (but separated by ~ instead of a comma because commas can appear in quotes) but if you have a better suggestion for a very easily editable file I will consider. I don’t expect more than 1000 quotes so it won’t be a big file. Obviously the Tweets will contain line breaks (Unix LF) so factor that in. The attached posts.txt is an example of how such a file could look.
It should be a standalone PHP8.1 script (no frameworks) to run on a Linux server that is called by cron once a day. It then has to pick a random Tweet from a file in the same directory on the server and post it to the Twitter account using the Twitter v2 API.
I was thinking the quotes could all be stored in a UTF8 CSV file (but separated by ~ instead of a comma because commas can appear in quotes) but if you have a better suggestion for a very easily editable file I will consider. I don’t expect more than 1000 quotes so it won’t be a big file. Obviously the Tweets will contain line breaks (Unix LF) so factor that in. The attached posts.txt is an example of how such a file could look.