Jump to content

Recommended Posts

Posted

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.

Posted

Other than the file pointer not being closed after being used, I see nothing wrong with the script... :dance:

 

Try checking the result of the fsockopen() and fupts() calls. Maybe something's going wrong there.

 

:|

Posted

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.

Posted

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 :dance:

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...