with the following script, I get
Fatal error: Property name must be a string in /home/content/e/s/o/esone/html/test/123.php on line 24
Anyone maybe know what is causing it?
Code: <?php
function seconds2HMS($inputval){
$hh = intval($inputval / 3600);
$ss_remaining = ($inputval - ($hh * 3600));
$mm = intval($ss_remaining / 60);
$ss = ($ss_remaining - ($mm * 60));
if($hh<10){
$hh='0'.$hh;
}
if($mm<10){
$mm='0'.$mm;
}
if($ss<10){
$ss='0'.$ss;
}
return $hh.':'.$mm.':'.$ss;
}
function checkTank($tankId){
$aquVs=118;//the current game version number
$hay=json_decode(file_get_contents("http://www.gaiaonline.com/chat/gsi/index.php?v=json&m=[[6500%2C[1]]%2C[6510%2C["".$tankId.""%2C0%2C1]]%2C[6511%2C["".$tankId.""%2C0]]%2C[6512%2C["".$tankId.""%2C0]]%2C[107%2C["null"]]]&X=".time()));
$gaiaT=$hay[0][2]->{'gaia_curr_time'};
$aquaN=$hay[1][2]->{$tankId}->{'name'};
$userN=$hay[1][2]->{$tankId}->{'user_id'};
$glowT=$hay[1][2]->{$tankId}->{'game_info'}->{1}->{"open_time"};
$play=$hay[1][2]->{$tankId}->{'game_info'}->{1}->{"player_count"};
if($glowT){
if($glowT<=$gaiaT){
if($glowT+720>$gaiaT){
if($play<34){
return 'Glowing for '.seconds2HMS($gaiaT-$glowT).' <a target="_blank" href="http://www.gaiaonline.com/tank/'.$userN.'/?userEnvironmentId='.$tankId.'&gsiUrl=www&isInEdit=false&firstTime=&location=popUp&quality=low&version='.$aquVs.'&graphicsServer=http://s.cdn.gaiaonline.com/images/Gaia_Flash/aquarium/&isGameActive=true">[Open Aquarium Link]</a>';
}
else{
return 'Full';
}
}
else{
return 'Glowed '.seconds2HMS($gaiaT-$glowT).' ago.';
}
}
else{
return 'Glowing in '.seconds2HMS($glowT-$gaiaT).' <a target="_blank" href="http://www.gaiaonline.com/tank/'.$userN.'/?userEnvironmentId='.$tankId.'&gsiUrl=www&isInEdit=false&firstTime=&location=popUp&quality=low&version='.$aquVs.'&graphicsServer=http://s.cdn.gaiaonline.com/images/Gaia_Flash/aquarium/&isGameActive=true">[Open Aquarium Link]</a>';
}
}
else{
return 'Not Glowing';
}
}
?>
Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.However it ruins html and bbcode tags.. . I only want it to have affect on everything else within $text but not
Best way to read this text file.
Hi.I am planning to make a small application in C# to convert the players from Football manager 2010 game into Fifa 10 game.I have this text file exported from
Page Reload
I am having issues getting a page to reload after I submit data to a database. This form should input data to a DB and then I want it to reload and list what is in database. I have gotten it to
Internal class functions don't seem to get executed.
Hi. Can someone please put me out of my misery on this. I don't write much PHP and this has me baffled. I've probably work myself into the wrong mindset with the time I've spent on this. What's
why aint this working?
i have this code:Code: $num = 250; $count = ($num - $rcount); echo $rcount; echo ""; echo $count;when i echo $rcount it gives me 153...so my calculations is 250-153 = 97.but
Can we convert non uni code system into unicode
Hi All,
Help with some dates
I have a list of dates in an array:$mondays = array( strtotime("October 12, 2009"), strtotime("October 19, 2009"), strtotime("October 26,
PHP Code To Change Font Color in Table Cell
I would appreciate help with the following snippet of my php code. I am just trying to change the font size in the row marked in red. The color is white, but I am unable to make the font
using file_get_contents??
okay how would i create a script using file_get_contents() in php have it grab search pages 1-20 and return the results based on whatever username was typed into the form.liek for example i would type
Comparing two dates
Hi GuysI have two dates I want to compare. Below is my current implementation. The problem with it is it always returns false:if(date("d/m/y", $course->finish_date) >