Hi all,

I have a site in php and I am trying to have an external site display within my site. I want to keep my menus in place but just have the external site display under them. include() doesnt seem to work as that just breaks everything for the external site. Is there any clean way to do this? I also do not currently use frames and would prefer not to if at all possible. Thanks for any help that can be offered!

    <?php
    
    echo "menu here";
    echo "<br><hr>";
    
    readfile ('http://www.google.com');
    
    
    
    
    ?>
    

    P/s: only thing is: graphics can't be displayd because the original picture links (<img src......) are messed up...

    Anyone got a better idea?

      Is there an issue with this and loading a url that is like.. http://www.whatever.com/somefile.cgi

      The google example works, without the images, as you said, but I am linking to a specific cgi page and that doesn't load anything. :mad: Any ideas on that one?

        yes, if you're trying to load a cgi page with my code that won't work also. The same reason why the images don't work, the path to the cgi server gets messed up also...

        I guess you don't want to use frames because you have pulldown menus above the site that can't be displayed correctly when in frames?
        I had this problem once. If that's the case take a look at these menus: http://www.smartmenus.org/ . These work even when in frames.

          I just didnt want to get into the frames deal with this program. Was hopping php had some way to load a cgi page within the current page's php setup. The readfile did exactly what I would of needed, just needed it to work for the cgi page🙁

            hmm I see, too bad. But hey, I'm no php-god 🙂 Maybe someone else has a solution for this?
            I would like to see how this can be done too..

              probably end up having to do frames for it=p Was just looking for a cleaner way. Thanks for your help though, that will help me with some of the nonphp pages I have🙂 I do appreciate it!

                darn, now frames for the one page creates a problem for someone trying to get out of them. I have a menu of links at the top, the rest of the program doesn't use frames, just the one particular page. Once I get someone to see the information that has been framed, if they click a link, it takes them with that frame to the new page but leaves the old frame. The links are based off of something like:

                $blockHeader->itemNavigation($blockHeader->buildLink("../users/edituser.php?","Add Person",in)); where a session id is tacked on after the ? and the Add Person is the menu text. I dont have a way to add something like TARGET="_top" to break out of a frame.. any ideas? (still new to php so maybe there is)

                  I can't really say anything about it with the info you gave.
                  It looks like the code you gave is used to execute a function called 'BuilLink' in a class.

                  You being new to php; a class is a seperate php file that contains functions that can be called from another php file.

                  You will probably find the class that is used by looking for a line that looks like include('......'); In that class there'll be a function BuildLink, there you could possibly change how the links work.
                  However, it could take some php knowledge on figguring out how to change the class to get the TARGET right.

                  I don't think I/we can solve this without taking a good look at the whole script...

                    Tomz, you rock. I realised there was a file called block.class that had all the class specifications for that bit of html. I was able to add the target item to that and it works like a charm now. Thanks for putting up with a noob🙂

                      haha, thanks! It's good to be able help someone here, after I've asked others here a million questions too 😉

                      Goodluck with your project!

                        Write a Reply...