Hi
I've got a webpage written with PHP and Flash running fine. When I change to use SSL that is support by my web host, the Flash part of my site went dead. What I can see is that the Flash is triggered by some PHP Session variables. When going through the SSL connection the Flash bit cannot grap the session variable so that it lies deadly. I wonder if anyone can help.
Many Thanks.
PHP, Flash and SSL
Moderator: General Moderators
Some of the code here:
Actionscript from the flash file:
function language( ) {
var sendPhp = new LoadVars();
var receivePhp = new LoadVars();
receivePhp.onLoad = function() {
if (receivePhp.loaded ) {
_root.test = this.ret;
if( this.ret == "eng") {
_root.gotoAndStop("eng");
} else if( this.ret=="tchi") {
_root.gotoAndStop("tchi");
}
}
}
sendPhp.sendAndLoad("lang.php",receivePhp,"GET");
}
The PHP code in file "lang.php"
<?
session_start();
if( !isset( $_SESSION['dd_lang'] ) ) {
echo "IS SET";
$_SESSION['dd_lang'] = "eng";
}
if( isset($_GET['cmd']) )
$command = $_GET['cmd'];
else
$command = "";
if( isset($_GET['arg1']) )
$arg1 = $_GET['arg1'];
if( $command=="get" ) {
// nothing to do
}
echo '&ret=';
echo $_SESSION['dd_lang'];
?>
They work absouletly fine going though simple connection. But when they go though SSL connection, it seems that the flash LoadVars object cannot grap any of those $_SESSION variable. any idea???
Many Thanks.
Actionscript from the flash file:
function language( ) {
var sendPhp = new LoadVars();
var receivePhp = new LoadVars();
receivePhp.onLoad = function() {
if (receivePhp.loaded ) {
_root.test = this.ret;
if( this.ret == "eng") {
_root.gotoAndStop("eng");
} else if( this.ret=="tchi") {
_root.gotoAndStop("tchi");
}
}
}
sendPhp.sendAndLoad("lang.php",receivePhp,"GET");
}
The PHP code in file "lang.php"
<?
session_start();
if( !isset( $_SESSION['dd_lang'] ) ) {
echo "IS SET";
$_SESSION['dd_lang'] = "eng";
}
if( isset($_GET['cmd']) )
$command = $_GET['cmd'];
else
$command = "";
if( isset($_GET['arg1']) )
$arg1 = $_GET['arg1'];
if( $command=="get" ) {
// nothing to do
}
echo '&ret=';
echo $_SESSION['dd_lang'];
?>
They work absouletly fine going though simple connection. But when they go though SSL connection, it seems that the flash LoadVars object cannot grap any of those $_SESSION variable. any idea???
Many Thanks.