Jump to content


Photo

Data retrieval help


  • Please log in to reply
4 replies to this topic

#1 sweetnikki

sweetnikki
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 June 2006 - 07:09 PM

I am very new to this php forum and php in general and I am kinda stuck. Perhaps you could find the time to lend some of your talent & expertise to me? Here is the problem: When this data is gathered it is not giving back the appropriate information. This is script for a game that is not operating properly. You click a corresponding # to add a single soldier to someones army. However it is not retrieving this part of the information

[!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]sweetnikki is building an army of Humans and now has 584 soldiers in sweetnikki [!--colorc--][/span][!--/colorc--]

This is the only info it is sending, only this part of the line [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]'s war machine.[!--colorc--][/span][!--/colorc--]

This is what I have:

if($Objects[$i]['state'] == 2)
{// Set flag that there is a working object
$Working = true;

// get html
$tmp = $g_Browser->Document->body->innerHTML;

// Look for success report
preg_match("/.*is building an army of [humanselvorcdw]{4,7} and now has [0-9]{1,6} soldiers in.*war machine./i", $tmp, $Report);
// See if one was found
if(count($Report))
{// got click result now see if already clicked
if(strpos($tmp, 'You have already clicked this link today. You may click again in'))
{// Already clicked user
$Objects[$i]['result'] = 2;
}
else
{// New click
$Objects[$i]['result'] = 1;

Any help would be greatly appreciated. Feel free to pm me if any additional info is needed.

Thank you, nikki

#2 klaroen

klaroen
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 17 June 2006 - 07:35 PM

Although I don't realy understand you request, it might have something to do with the ' sign. That a very sencitive sign in php. Maybe you know this and maybe not.... :P

to make sure php reads a ' sign as a ' sign and not like " you have to do this:
\' (then the ' becomes like text and not a php character)


Greets,
enjoy playing kings of chaos or one of his many clones ;)

#3 sweetnikki

sweetnikki
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 June 2006 - 07:40 PM

[!--quoteo(post=385062:date=Jun 17 2006, 03:35 PM:name=klaroen)--][div class=\'quotetop\']QUOTE(klaroen @ Jun 17 2006, 03:35 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Although I don't realy understand you request, it might have something to do with the ' sign. That a very sencitive sign in php. Maybe you know this and maybe not.... :P

to make sure php reads a ' sign as a ' sign and not like " you have to do this:
\' (then the ' becomes like text and not a php character)
Greets,
enjoy playing kings of chaos or one of his many clones ;)
[/quote]


Ahh right on thanks I'm going to try and re-do that now. :) I'll let ya know what happens.

#4 klaroen

klaroen
  • Members
  • PipPipPip
  • Advanced Member
  • 34 posts

Posted 17 June 2006 - 07:43 PM

oke, I hope it works because I'm not to smart with PHP either and otherwise I can't help you anymore... I think :P

#5 sweetnikki

sweetnikki
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 17 June 2006 - 07:46 PM

[!--quoteo(post=385070:date=Jun 17 2006, 03:43 PM:name=klaroen)--][div class=\'quotetop\']QUOTE(klaroen @ Jun 17 2006, 03:43 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
oke, I hope it works because I'm not to smart with PHP either and otherwise I can't help you anymore... I think :P
[/quote]

LOL well that didn't work. Its the same as before, only [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--] 's war machine.[!--colorc--][/span][!--/colorc--] shows up :(

[!--coloro:#CC33CC--][span style=\"color:#CC33CC\"][!--/coloro--]Anyone else have any ideas? My head hurts from looking at all these lilttle characters of code for 2 1/2 days to find an error that is probably like a big red barn, I just can't see it.

Thanks [!--colorc--][/span][!--/colorc--]






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users