CDfuse.com Posted November 4, 2004 Posted November 4, 2004 We had a shoutcast query script on our server that died whenever server 38 crashed. I'm beginning to think its not working because something wasn't setup correctly upon reinstallation but I wanted to run the script through you guys to see if something else may be wrong. ><?php $fp = fsockopen("ct2.fast-serv.com", 8782, &$errno, &$errstr, 30); fputs($fp,"GET /index.html HTTP/1.0\r\nUser-Agent: XML Getter (Mozilla Compatible)\r\n\r\n"); while(!feof($fp)) { $page .= fgets($fp, 1000); } echo $page; ?> On my local machine, this works fine. It goes to the server, grabs the page, and then spits it back out. Obviously, the data is manipulated after that but for now, I just want to get this part working. Quote
borfast Posted November 5, 2004 Posted November 5, 2004 Other than the file pointer not being closed after being used, I see nothing wrong with the script... Try checking the result of the fsockopen() and fupts() calls. Maybe something's going wrong there. :| Quote
CDfuse.com Posted November 5, 2004 Author Posted November 5, 2004 Yeah, I know about the closure on there. I think I've found the root of the problem though. I can use fsockopen() all day if I'm just accessing port 80 on a server, but the minute I change that, it won't connect. I'll put in a helpdesk ticket as it seems like the server is blocking requests made to a non-standard port. Quote
borfast Posted November 5, 2004 Posted November 5, 2004 That was my guess, too. I just wanted you to check first, before telling you to submit a help desk ticket. Glad you nailed it Quote
CDfuse.com Posted November 8, 2004 Author Posted November 8, 2004 Help desk notified, port opened, works like a charm. Thanks again! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.