I have a script that works on php5 but not on my php4 servers, I need some help to recode this part. I have found some tutorials online but just can`t make them work... Here is what I have: file_put_contents('1count', 0); Code (markup): How can I code this to work on php4? [edit] I have managed to make it work on php 4, here is the code that I added before the old code: function file_put_contents($filename, $data) { if( $file = fopen($filename, 'w') ) { $bytes = fwrite($file, is_array($data) ? implode('', $data) : $data); fclose($file); return $bytes; // return the number of bytes written to the file } } Code (markup):