Simple PHP script is not working-help please
Just moved from RHL 7.3 , PHP 4.3.4. server to new server RHEL 3 , PHP 4.3.4. My clients reporting problems with somescripts not running how they shouldSimple PHP script is not working. On previous server it worked. It seems to be some kind of PHP problem.
The script needs to drag content from another html page but it is only including title and no text below that. What should I look on my server and fix to make this work.
Here is the script and on my box this cript is only getting title but nothing below that:
<?php
$filename = "http://prognoza.hr/hrsutra_n.html";
$handle = fopen ($filename, "r");
$contents = fread ($handle, 4096);
fclose ($handle);
$array = split("\n", $contents);
$matches = preg_grep("/^[^<]|Prognoza vremena za Hrvatsku za/", $array);
while(list($key, $val) = each($matches)) {
if (preg_match("/Prognoza vremena za Hrvatsku za/i", $val))
{
$val = preg_replace("/<.*?>Prognoza vremena/", "", $val);
$val = preg_replace("/<.*?>/", "", $val);
print ("<strong>".$val."</strong><br>\n");
}
else
{
print ($val."\n");
}
};
?>
******************
Is there anything I could try to edit/change in php.ini so this script could run ?
If you look at the URL from which data is coming you will see that there is title and text below.
I'am just out of ideas. I recompiled Apache to match like on old server but nothing changed so I think it could be php.ini file but what to change to make this work.