Welcome to WebmasterWorld Guest from 23.22.220.37

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Php include problem

     
12:39 am on Mar 23, 2007 (gmt 0)

Full Member

10+ Year Member

joined:Feb 25, 2002
posts:311
votes: 0


For about 1 year I have been successfully using php include on my pages. They display search results from my database. Something like this,

<?php @include('http://www.example.com/search.php?q=widgets');?>

It will then print links on my pages with code such as,

http://www.example.com/search.php?id=16827

The problem I have been experiencing is that during parcing this part of the search url code is altered.

id=16827

When it should be - id=16827

it has been changed to - id=15427

The id number change has no logic to the alteration and left me scratching my head as to why this happens.

I can run a search query in my browser from the script and the correct id number is produced. I parse it into my pages using php include and it is altered.

Seems bizaare.

[edited by: dreamcatcher at 3:22 pm (utc) on Mar. 23, 2007]
[edit reason] Use example.com, thanks. [/edit]

2:25 am on Mar 23, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 12, 2005
posts:5966
votes: 0


Hello Mike,

It seems fishy, indeed. My only guess is that there is some logical error in the included file. Just including the file should not change something like that, which leads me to believe something in the included file is altering it without your knowledge.

If I were you, I'd try to follow the logic of the included script all the way until the link is output to the browser. If need be, add some

echo
's in there so you can see what variables are equal to along the way. These types of errors are the hardest to spot.

Good luck! :)

11:59 am on Mar 23, 2007 (gmt 0)

Full Member

10+ Year Member

joined:Feb 25, 2002
posts:311
votes: 0


thx for the reply :)

whats really odd is when I run the included file in a browser it produces no error. and this file was working perfectly for a year using php include. my host recently altered the nameservers so something has changed a little with the hosting. this is the only thing i can think of.

12:51 pm on Mar 23, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member henry0 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 19, 2003
posts:4388
votes: 2


Did you check if your link format is not reacting to some weird mod rewrite that has been added without your knowledge (While altering server)
11:34 pm on Mar 23, 2007 (gmt 0)

Full Member

10+ Year Member

joined:Feb 25, 2002
posts:311
votes: 0


ended up loading the script in an iframe, not ideal but no other option.

this problem really baffled me beyond belief. ah well

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members