Here, i'm trying to connect to a page to put the content in a string to parse it later. I can't use the server IP address because it's hidden.
When I run that page, I get the following error:
What can I do to fix that?
Code:
$fp = fsockopen ('[URL unfurl="true"]http://quebecpeche.com',[/URL] 80, $errno, $errstr, 120);
$out = "GET /index.php HTTP/1.1\r\n";
$out .= "Host: [URL unfurl="true"]www.quebecpeche.com\r\n";[/URL]
$out .= "Connection: close\r\n\r\n";
fwrite ($fp, $out);
while (! feof ($fp))
{
$content .= fgets ($fp, 4096);
}
fclose ($fp);
When I run that page, I get the following error:
Code:
Warning: fsockopen() [function.fsockopen]: unable to connect to [URL unfurl="true"]http://quebecpeche.com:80[/URL] (Unable to find the socket transport "http" - did you forget to enable it when you configured PHP?) in /var/[URL unfurl="true"]www/html/test.php[/URL] on line 1
What can I do to fix that?