Join Login


Fotolia
 PHP and MySQl Open
 by RiverCityGraphix - Apr 02, 2010

This forum category is now open for discussion.


Be sure to subscribe on YouTube.

Do you take great photos? Consider selling them on Dreamstime.
RiverCityGraphix
United States
Posts:327
Joined:Nov 21, 2009
 RE: PHP and MySQl Open
 by RiverCityGraphix - Jun 10, 2010

This is a reply to ensure correct functionality.


Be sure to subscribe on YouTube.

Do you take great photos? Consider selling them on Dreamstime.
RiverCityGraphix
United States
Posts:327
Joined:Nov 21, 2009
 RE: PHP and MySQl Open
 by NattTheStar - Sep 15, 2010

hi how do you pull this php script into flash?

<?
include_once('ShoutcastInfo.class.php');
?>
<html>
<head>
<title>Status Shoutcast</title>
<meta http-equiv='refresh' content='30' />
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
</head>
<body style="background:#000000;color:gray;font-family:Verdana;font-size=10">
<table width="350" style="border:0px solid blue;border-

collapse:collapse;background:black;color:blue;">
<?php
$scs = &new ShoutcastInfo("122.155.0.111","9140");
//$scs = &new ShoutcastInfo($_GET["ip"],$_GET["port"]);

ip=203.146.253.103&port=8000

if( !$scs->connect() )
{
$scs->error();
print '&#3605;&#3636;&#3604;&#3605;&#3656;&#3629; Server &#3652;&#3617;&#3656;&#3652;&#3604;&#3657;</td></tr>';
$error = TRUE;
}

if( $error != TRUE )
{
$scs->send();
if( !$scs->get_stat() )
{
print '<tr><td colspan="2">&#3604;&#3637;&#3648;&#3592;&#3652;&#3617;&#3656;&#3629;&#3618;&#3641;&#3656;&#3588;&#3619;&#3633;&#3610;</td></tr>';
}
else //If server is online..
{
print '<tr><td width="30%" align="right" valign="top"><b><font size="2">PJ OnAir <font

color="red">:</font</b></td>';
print '<td width="70%"><font size="2" color="white">'.$scs->get_title().'</font></td></tr>';
print '<tr><td align="right" valign="top"><b><font size="2" >Music <font

color="red">:</font></b></td>';
print '<td><font size="2" color="white">'.substr($scs->get_track

(),0,27).'</font></td></tr>';
print '<tr><td align="right" valign="top"><b><font size="2" >listener <font color="red">:

</font></b></td>';
$listeners = $scs->get_listener();
print '<td><font size="2" color="white">'.$listeners.'</font></td></tr>';
}
$scs->close();
}

?>
</table>
</body>
</html>



NattTheStar
United States
Posts:7
Joined:Sep 15, 2010
 RE: PHP and MySQl Open
 by NattTheStar - Sep 15, 2010

sorry,it's in Thai letters I will fixed it

I want to know AS3 like twitter flash you did on tutorial

<?
include_once('ShoutcastInfo.class.php');
?>
<html>
<head>
<title>Status Shoutcast</title>
<meta http-equiv='refresh' content='30' />
<meta http-equiv="Content-Type" content="text/html; charset=tis-620" />
</head>
<body style="background:#000000;color:gray;font-family:Verdana;font-size=10">
<table width="350" style="border:0px solid blue;border-

collapse:collapse;background:black;color:blue;">
<?php
$scs = &new ShoutcastInfo("122.155.0.111","9140");
//$scs = &new ShoutcastInfo($_GET["ip"],$_GET["port"]);

ip=203.146.253.103&port=8000

if( !$scs->connect() )
{
$scs->error();
print 'cannot connect to Server</td></tr>';
$error = TRUE;
}

if( $error != TRUE )
{
$scs->send();
if( !$scs->get_stat() )
{
print '<tr><td colspan="2">DJ not online</td></tr>';
}
else //If server is online..
{
print '<tr><td width="30%" align="right" valign="top"><b><font size="2">PJ OnAir <font

color="red">:</font</b></td>';
print '<td width="70%"><font size="2" color="white">'.$scs->get_title().'</font></td></tr>';
print '<tr><td align="right" valign="top"><b><font size="2" >Music <font

color="red">:</font></b></td>';
print '<td><font size="2" color="white">'.substr($scs->get_track

(),0,27).'</font></td></tr>';
print '<tr><td align="right" valign="top"><b><font size="2" >listener <font color="red">:

</font></b></td>';
$listeners = $scs->get_listener();
print '<td><font size="2" color="white">'.$listeners.'</font></td></tr>';
}
$scs->close();
}

?>
</table>
</body>
</html>



NattTheStar
United States
Posts:7
Joined:Sep 15, 2010
 RE: PHP and MySQl Open
 by RiverCityGraphix - Sep 18, 2010

Getting Flash to work with PHP is tricky business. It usually isn’t as easy as just bringing in PHP because you are dealing with two different coding languages, PHP and ActionScript. Unfortunately, I have not had much experience working with PHP in Flash. The extent of it has been with the Twitter Api to this date. Also, html does not work too well in Flash, you will probably need to do the formatting with Flash itself although some text areas can be set to accept some html commands.

When looking at your code, it appears that you are making a ShoutCast application for online DJing. This sounds like a cool project. I am sure that a website like ShoutCast provides some sort of documentation for Flash in their Api. If they do not, you may want to contact the company because they will have a better understanding of their software then I do. Also, there may be tutorials that can help you get started on your project. Do a search for “ShoutCast Api tutorials” and see what you can find.

I would be interested to see how your project progresses and what you find out. Welcome to the forums and I hope to see you around.


Be sure to subscribe on YouTube.

Do you take great photos? Consider selling them on Dreamstime.
RiverCityGraphix
United States
Posts:327
Joined:Nov 21, 2009
 RE: PHP and MySQl Open
 by NattTheStar - Sep 18, 2010

oh,ok
Thanks


NattTheStar
United States
Posts:7
Joined:Sep 15, 2010
 RE: PHP and MySQl Open
 by longlah - Mar 16, 2011

Hai admin and member,,,
Please assist me on using xampp... i am a newbie in xampp
below are several problem i am facing now.
1. My lecturer gives me project of making a web based system.. so i would like to try online shop
2. I dont know how to operate with xampp..

and please gives me some tutorials so that i can understand

Thanks all

regards

Sgiit


longlah
Indonesia
Posts:3
Joined:Mar 15, 2011
  
Home About Contact Forum Youtube Privacy Policy
Copyright © 2009-2011 RiverCityGraphix.All Rights Reserved.