On Wed, 17 Dec 2003 00:03:19 +0100, Rob <un*****@anonymous.net> wrote:
using PHP 4.3.3 and Apache (ADVX) 2.0.47 and i want to get the contents of
my SETI stats site :
$personal = implode("",
@file("http://setiathome.ssl.berkeley.edu/fcgi-bin/fcgi?email=$email&cmd=user_stats_new"));
which gives me this :
Warning: implode(): Bad arguments. in
/home/rob/www/php/phpMySetiStats/download.php on line 4
what am i doing wrong ? i used this code a couple of months back on somewhat
older versions of PHP/Apache in Windows2000 and it worked ... ??
You've suppressed warnings with @, and you're using the return value from
file() directly. So there's two easy places you can help yourself:
(a) Remove the @, and look at any warning produced.
(b) Execute the file() separately and use var_dump to examine what it returns.
Read the manual page, and what file() can return:
http://uk2.php.net/file
Which of the two possible return types could give a problem with implode()?
And anyway - if you're on 4.3, you may as well use file_get_contents().
--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (
http://www.andyh.co.uk)
Space: disk usage analysis tool (
http://www.andyhsoftware.co.uk/space)