Need an assist from the PHP gurus. I'm trying to set up a PHP script that generates an image from the latest Twitter status.
I'm working off an example
here.
Followed the instructions there explicitly -- tried saving the script as a PHP file and got errors like this:
Warning: filemtime(): Stat failed for twitter.txt (errno=2 - No such file or directory) in [...] on line 30
Fatal error: Call to undefined function: simplexml_load_file() in [...] on line 34
I assigned the correct permissions to the file. When I tried renaming the file as a PNG (as suggested for using on forums that require an image extension), it just gives me a corrupt PNG file when I access it. Trying both versions of .htaccess suggested in the example did not fix this.
Other possibly relevant info: test site is hosted on GoDaddy and I'm not sure if there's any PHP issues with them.
So, is there something obvious I might be missing that isn't listed on the above linked site? Is there an easier way to generate an image of Twitter updates?
The other error is exactly what it says, there's no file twitter.txt, this isn't a major issue - if php has write permissions for the folder, you should only get this error the first time the script runs successfully - after that the file should exist because the script will have created it.
This is the php4 simplexml backport
posted by missmagenta at 3:17 AM on November 19, 2007