devnill
10-25-2006, 05:47 AM
I am creating an app in flash that will monitor the bandwidth my computer consumes and alerts the user when they exceed a certain point.
On the homepage of my college, there is page a that will display how much bandwidth was used sofar into the day, and I have created a php script to output a plaintext number that is the number of megabytes used.
The problem that i am having has to do with flash loading the value. Ive tried the loadVariables() function, but i am having no luck.
the following is my PHP, it uses a regular expression to find the number on the url, and outputs it without any formatting.
<?php
$site=file('http://wa1.alfredstate.edu/bandwidth/default.php');
$unsorted=implode(',',$site);
preg_match("/<td>(.*?) Megabytes<\/td>/",$unsorted, $matches);
echo $matches[1];
?>
How can i have flash load the value the php outputs?
Thanks,
Dan Singer
On the homepage of my college, there is page a that will display how much bandwidth was used sofar into the day, and I have created a php script to output a plaintext number that is the number of megabytes used.
The problem that i am having has to do with flash loading the value. Ive tried the loadVariables() function, but i am having no luck.
the following is my PHP, it uses a regular expression to find the number on the url, and outputs it without any formatting.
<?php
$site=file('http://wa1.alfredstate.edu/bandwidth/default.php');
$unsorted=implode(',',$site);
preg_match("/<td>(.*?) Megabytes<\/td>/",$unsorted, $matches);
echo $matches[1];
?>
How can i have flash load the value the php outputs?
Thanks,
Dan Singer