URL to call a page?

Discussion in 'PHP' started by Sportscapper Island, Mar 19, 2006.

  1. #1
    Hi,

    I am trying to set up a php include into my page. I have directions but I know very little on php.

    The directions say to insert this code into my page, not this code but it's an example.

    <?include("http://xxxxxx.xxx/MyFeed.aspx?".$_SERVER["QUERY_STRING"])?>
    Code (markup):
    Then the directions say Use the following url to call the page where you insert the code : yourfilename.php?feedID=698


    I have no idea what to do. Anyone know how to do this that could give me a hand?

    Thanks
     
    Sportscapper Island, Mar 19, 2006 IP
  2. JamesIsHere

    JamesIsHere Guest

    Messages:
    105
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm not sure about that whole block of code, I'm assuming you know more than I do. But the include tags I'm using for my page do not have the whole query string. All mine do is include a section such as navigation on my page, and to execute them all I need is:

    <?php include_once('Navigation/left.php'); ?>

    If its something more complicated try elaborating a bit more otherwise this may be all you actually need.

    I use include_once because its safer for if your dealing with variables and what not. But you won't lose any of the benefits from a normal include statement.
     
    JamesIsHere, Mar 19, 2006 IP
  3. Citizen

    Citizen Active Member

    Messages:
    399
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    58
    #3
    You're using inappropriate quotes.

    Assuming this is actually the code you want to use, it should look like this:

    <?php include('http://xxxxxx.xxx/MyFeed.aspx?'.$_SERVER["QUERY_STRING"])?>
    PHP:
    Edit: oops
     
    Citizen, Mar 19, 2006 IP
  4. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks guy, but it's still not working. I don't know what it is. That is all the directions I got. I'm on a .php page so that's not the problem.
     
    Sportscapper Island, Mar 19, 2006 IP
  5. onlyican.com

    onlyican.com Peon

    Messages:
    206
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    your extension is aspx which is .net

    Can u run php scripts inside that
     
    onlyican.com, Mar 20, 2006 IP
  6. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #6
    What error is is generating?
     
    exam, Mar 20, 2006 IP
  7. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I get this when I put the include code in my page.

    "Please remember to include your feedId in the querystring!"

    The first post is the directions, I just put in the include it says.

    I'm not too sure what

    "Use the following url to call the page where you insert the code : yourfilename.php?feedID=698"

    That is what I'm stuck on.
     
    Sportscapper Island, Mar 20, 2006 IP
  8. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #8
    It should work as you have it as long as $_SERVER["QUERY_STRING"] contains literally "feedID=698" which it probably doesn't.

    The URL you call in your include needs to look like this:

    'http://xxxxxx.xxx/MyFeed.aspx?feedID=6654'
     
    exam, Mar 20, 2006 IP
  9. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    So what should I do replace ["QUERY_STRING"] with ["feedID=698"]
     
    Sportscapper Island, Mar 20, 2006 IP
  10. woodside

    woodside Peon

    Messages:
    182
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yes, do like exam suggests. You don't need to use ["QUERY_STRING"] at all.
     
    woodside, Mar 20, 2006 IP
  11. Citizen

    Citizen Active Member

    Messages:
    399
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    58
    #11
    Is "feedID=698" going to change? The only reason why you'd need to include a php variable is if its going to change.
     
    Citizen, Mar 21, 2006 IP
  12. exam

    exam Peon

    Messages:
    2,434
    Likes Received:
    120
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Post or PM the actual URL and instructions and I'll sort it for you.
     
    exam, Mar 21, 2006 IP
  13. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Thanks Guys, I got it to work. Stupid me was forgetting to call the feedID in the URL, I was just calling my filename without the feedID in it.

    That's the next thing I have to figure out, how to get it to work without the feedID in the URL.
     
    Sportscapper Island, Mar 24, 2006 IP
  14. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Does anyone know how I could strip out the feedID=698 in the url and just have my filename?

    I saw someone else with the same feed do this but I have no clue :mad:
     
    Sportscapper Island, Mar 27, 2006 IP
  15. parad0x

    parad0x Active Member

    Messages:
    510
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    70
    #15
    If you explain it I may help..
     
    parad0x, Mar 28, 2006 IP
  16. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    I have a feed setup from another site with a php include. I have to call it by the url www.xxxx.com/filename.php?feedid=698 for it to work. If I just put in the filename without the ?feedid=698, it doesn't work right.

    I wanted to know how I could call the page with just the filename without the ?feedid=698 in the url.

    Here is how the php include is set up now.

    <?include("http://feed.xxxxxx.com/MyFeed.aspx?".$_SERVER["QUERY_STRING"])?>
    Code (markup):
    and I call the page by putting in www.myurl.com/filename.php?feedid=698


    I wanted to know How I could just call the page by just www.myurl/filename.php

    I know there is a way because someone on another website has the exact same feed and just calls the filename of thier site and no feedid in the url?
     
    Sportscapper Island, Mar 28, 2006 IP
  17. parad0x

    parad0x Active Member

    Messages:
    510
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    70
    #17
    I know how to make it id/feedback.php but don't know how to do it only feedback.php.
     
    parad0x, Mar 28, 2006 IP
  18. Sportscapper Island

    Sportscapper Island Peon

    Messages:
    87
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Yeah, I'm basically looking for a strip out rather than a Mod Rewrite. I guess I mind as well do a mod rewrite on it.

    Thanks
     
    Sportscapper Island, Mar 28, 2006 IP