FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


HomeWatched TopicsRegisterSearchDirectory
FAQMemberlistUsergroupsLog inStoresItemsBank
Google

Reply to topic Page 1 of 1
PHP Script interfering with Flash Onload handler
Message  

Reply with quote
Post PHP Script interfering with Flash Onload handler 
There is something wrong with my php script, which prevents the onload event handler of my sendAndLoad from working.

I tested it on other smaller php scripts and it works.

Please help, thanks.

<?php
///////////////////////////////////////////////////////////
// API test program for betfair API
///////////////////////////////////////////////////////////
//header("Content-Type: text/xml");
// Initialize SOAP web services and login:
$Betfair = new SoapClient('https://api.betfair.com/betex-api-public-ws/BFService.wsdl');

$xml = $_POST['LoginDetails'];

$postdata = file_get_contents('php://input');

$LoginXml = simplexml_load_string($postdata);
//$user = $_GET['Username'];
//$pass = $_GET['Password'];
$SportId = $_POST['SportId'];

$user = $LoginXml->username; $pass = $LoginXml->password;

$LoginResult = $Betfair->Login(array("request" => array("username"=>$user,
"password"=>$pass,
"productId"=>26,
"vendorSoftwareId"=>342,
"locationId"=>0)));

$BetfairSessionToken = $LoginResult->Result->header->sessionToken;

$BetfairRequestHeader = new StdClass();
$BetfairRequestHeader->clientStamp = 0;
$BetfairRequestHeader->sessionToken = $BetfairSessionToken;

$AccountsResult = $Betfair->getAccountFunds(array("request" => array("header"=>$BetfairRequestHeader)));
ob_start();

$ActiveEventsResult = $Betfair->getActiveEventTypes(array("request" => array("header"=>$BetfairRequestHeader)));
$ActiveEventsArray = get_object_vars($ActiveEventsResult);

$results = array();
foreach($ActiveEventsArray['Result']->eventTypeItems as $events)
{
    foreach ($events as $event)
    {
        $results[] = array('id'=>$event->id, 'name'=>$event->name);
    }
}

$flag = false;
$Container = '<?xml version="1.0" encoding="UTF-8"?>';$Container .= '<Set>';
foreach($results as $key=>$menu)
{
    $Container .= '<Result><Key>' . $key . '</Key><Id>' . $menu['id'] . '</Id><Name>' . $menu['name'] . '</Name>';
    if ($flag === false)
    {
        $Container .= '<ErrorMessage>Successful Login</ErrorMessage><Balance>' . $Balance . '</Balance>';
        $flag = true;
    }
    $Container .= '</Result>';
}
    
$Container .= '</Set>';
echo($Container);
$output = ob_get_contents();
ob_end_clean();
$fp = fopen("c:/tempfile.txt", "w");
fwrite($fp, $output);
fclose($fp);
exit();
?>

View user's profile Send private message

Reply with quote
Post  
Are you recieveing any errors? Did you propperly write an error catcher file?

View user's profile Send private message
Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  



Google

FireFox! The PHP Forum Loans and Credit
Panama Web Design for Hire Free Insurance Quotes!
Web Hosting Advertise Here $10 a Month Designer Children
Never Pay Taxes Again HGH Domain name registration
Web Hosting and Dedicated Servers Insurance Affordable web-hosting


Web Design by PlatinumShore.com & Web Hosting by TradeWebHosting.com