Please Help :-( Problem with PHP Room Browser

apps

#1

I need help, I can’t fix my PHP Chatroom Browser after Dreamhost blocked the “allow_url_fopen” (which is the PHP Chat Room Browser Function).

They’ve recommended using a “PHP Curl subroutine” for greater security, and now, I have another error located here: http://www.xanadu.dreamhost.com/secure_wishbone_frame.php

“Warning: fgets(): supplied argument is not a valid stream resource”

What do I do about “fgets?”

My source code is:


<!doctype html public “-//w3c//dtd html 4.0 transitional//en”>

<?php { $curl_handle = curl_init(); // Where should we get the data? curl_setopt ($curl_handle, CURLOPT_URL, 'http://wishbone.optichat.com/user_list.py?site=xanadu'); // This says not to dump it directly to the output stream, but instead // have it return as a string. curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1); } $rooms = array(); while ($data = fgets($fp, 8192)) { if($data[0]=="=") { $data = substr($data,1); list($key,$val) = explode('=', $data, 2); $key = trim($key); $val = trim($val); if($key=="room") { if($room) { sort($rooms[$room]); $rooms[$room] = implode("\n", $rooms[$room]); } $room = $val; $rooms[$room] = array(); } else { $rooms[$room][] = $val; } $val = trim($val); } } if(count($rooms)) { sort($rooms[$room]); $rooms[$room] = implode("\n", $rooms[$room]); } ?>