AM usnig Flash MX 2004.
I got a php script that checks if a web server is up or down.
I’d like to get the variable $data from this script color=seagreen[/color] into my movie with a [color=blue]condition.[/color]
Like [color=blue]if[/color] $data = up then my movie clip go to frame 25
[color=blue]else if[/color] it plays lets say frame 30.
But i dunno how to do that, have tried many tutorials but always got an undefined error.
here’s the script :
[font=Courier New][color=seagreen]<?php
//Web Server Status v 1.2, Copyright 2002 By Ryan Schwiebert, visit list($addr,$port)= explode (’:’,"$link");
if (empty($port)){
$port = 80;
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
$status = “up”;
}
else {
$status = “down”;
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, “/”));}
return $addr;
}
?>[/color][/font]
[color=black]Thanks for helping me on this one please. Help a newbie :)[/color]