need a fix regarding this particular piece of code....

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   need a fix regarding this particular piece of code....
scz74
CZ Active Member
scz74 has been a member for over 20 year's 20 Year Member
philippines.gif
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Aug 15, 2004
0.02 posts per day
Posts: 145
Points: 7,972
   
hi i have this piece of code to show:

global $prefix, $dbi, $dynkeys, $description, $date;
$remote = getenv ("REMOTE_ADDR");
$uri = getenv ("REQUEST_URI");
//echo "remote: $remote,<br>\n"
//."uri: $uri<br>\n";

if (eregi("article\&sid=([0-9]{1,5})",$uri,$regs)){
//debug
//echo "debug all true!<br><br>\n";
//echo "regs1: $regs[1]<br>\n";
$storyid = $regs[1];
$result = sql_query("select keywords, description from $prefix"._metakeys." WHERE storyid='$storyid'", $dbi);
while(list($dynkeys, $description) = sql_fetch_row($result, $dbi)){
$result2 = sql_query("select time from $prefix"._stories." WHERE sid='$storyid'", $dbi);
while(list($date) = sql_fetch_row($result2, $dbi)){
return $date;
return $dynkeys;
return $description;
}
}
}
} //ende func

now this particular piece of code is my problem: (highlighted in red in the code above)

if (eregi("article\&sid=([0-9]{1,5})",$uri,$regs)){

the reason this is my problem because i cant convert is to its googletapped code counterpart. The above code works fine if i have gt turned off but if i turn it on the whole thing doesnt work.

can any code wiz here lend a hand on how to convert it? Thanks in advance... hope telli can give this a quick look. icon_neutral.gif




_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
Back to top Reply with quote
#2   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 20 year's 20 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 47
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Just a guess, but does that back slash need to be there?




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#3   re: need a fix regarding this particular piece of code....
scz74
CZ Active Member
scz74 has been a member for over 20 year's 20 Year Member
philippines.gif
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Aug 15, 2004
0.02 posts per day
Posts: 145
Points: 7,972
   
thanks for the reply mjufford, i tried pulling it out but still no luck, i guess the backslash is ok because by using the conventional phpnuke url the whole code works its with the use of the googletap that the code doesnt have an effect. icon_sad.gif




_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
Back to top Reply with quote
#4   
jcb
CZ Active Member
 Codezwiz Site Donator
uk.gif
Occupation: Soldier
Age: 49
Gender: Male
Fav. Sports Team: England
Status: Offline
Joined: Oct 20, 2003
0.02 posts per day
Posts: 135
Points: 7,618
   
Have you tried changing that line from:

if (eregi("article\&sid=([0-9]{1,5})",$uri,$regs)){

To:

if (eregi("article\&sid=([0-9][1,5])",$uri,$regs)){ icon_question.gif

Might work?




_________________
PHP Super NooB
Back to top Reply with quote
#5   re: need a fix regarding this particular piece of code....
scz74
CZ Active Member
scz74 has been a member for over 20 year's 20 Year Member
philippines.gif
Age: 50
Gender: Male
Website:
Status: Offline
Joined: Aug 15, 2004
0.02 posts per day
Posts: 145
Points: 7,972
   
thanks jcb ill give that a go. icon_smile.gif




_________________
[ Register or login to view links on this board.]
[ Register or login to view links on this board.]
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum