hey,
can anyone help me with this:
I want some dynamic text from a html file (it changes every 3 minites) to save in a variable. I had a way to do this:
But this ain't working good, when i refresh my php page, my echoed var changes every time, so its not a good way!
someone can help me please? :sad:
can anyone help me with this:
I want some dynamic text from a html file (it changes every 3 minites) to save in a variable. I had a way to do this:
Code:
<?php
$url = "http://example.com/dyncontent.html";
//open this file to read
$fp = fopen($url, "r");
$search = fread($fp, 50000);
fclose($fp);
//search for the tags which surround the figure
$search = ereg('some text before the wanted content>(.*)and here behind', $search,$content);
echo 'dyncontent=' . $content[1];
?>
But this ain't working good, when i refresh my php page, my echoed var changes every time, so its not a good way!
someone can help me please? :sad: