Jump to content

Data retrieval help


sweetnikki

Recommended Posts

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
Link to comment
Share on other sites

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 ;)
Link to comment
Share on other sites

[!--quoteo(post=385062:date=Jun 17 2006, 03:35 PM:name=klaroen)--][div class=\'quotetop\']QUOTE(klaroen @ Jun 17 2006, 03:35 PM) [snapback]385062[/snapback][/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.
Link to comment
Share on other sites

[!--quoteo(post=385070:date=Jun 17 2006, 03:43 PM:name=klaroen)--][div class=\'quotetop\']QUOTE(klaroen @ Jun 17 2006, 03:43 PM) [snapback]385070[/snapback][/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--]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.