EmperorJazzy Posted March 17, 2012 Share Posted March 17, 2012 When a link is clicked on one page (listing page), and I want to open it in a new window, I'd like to have a title section across the top say height=30, and the linked web page displayed below. I've been researching and have found that both file_get_contents or iframes could do the job. I briefly attempted iframes src=x but after loading, the web page takes over the browser and the title section disappears. Can I use file_get_contents to display the web page as it's written below the title section? I've seen someone mention using a DIV for it. Could someone provide some guidance? BTW: the title section is going to be used to allow the user to select an alert to be set in my database. But also have the option to 'hide'. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/259161-file_get_contents-or-iframes/ Share on other sites More sharing options...
litebearer Posted March 17, 2012 Share Posted March 17, 2012 Essentially, file_get_contents does what it says - gets the content of a file - it really has NOTHING to do with how that file content is displayed. Quote Link to comment https://forums.phpfreaks.com/topic/259161-file_get_contents-or-iframes/#findComment-1328583 Share on other sites More sharing options...
EmperorJazzy Posted March 18, 2012 Author Share Posted March 18, 2012 Hmm so iFrames then? Quote Link to comment https://forums.phpfreaks.com/topic/259161-file_get_contents-or-iframes/#findComment-1328643 Share on other sites More sharing options...
SaCH Posted March 18, 2012 Share Posted March 18, 2012 The function file_get_contents() is used to get the content of a webpage. But if you use the function it will not work anymore action on the result page. I mean after displaying the contents of an webpage suppose that there will be some links & if you click on that link it won't work.... Even i suggest you to use <iframe> option to do this. Quote Link to comment https://forums.phpfreaks.com/topic/259161-file_get_contents-or-iframes/#findComment-1328721 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.