# Newbie here, need help

**URL:** https://forum.kirupa.com/t/newbie-here-need-help/53397
**Category:** programming
**Created:** [June 3, 2004, 9:40am UTC](https://forum.kirupa.com/t/newbie-here-need-help/53397 "2004-06-03T09:40:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![neeeko](https://avatars.discourse-cdn.com/v4/letter/n/a698b9/32.png) [@neeeko](https://forum.kirupa.com/u/neeeko)
#### Post date: [June 3, 2004, 9:40am UTC](https://forum.kirupa.com/t/newbie-here-need-help/53397/1 "2004-06-03T09:40:02Z")

</div>

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]
