include a website in php file
Hi i am trying to include a webpage link from another website into my website. how can i do this?
i tried
<?php web_include ('http://website.com/website.html') ; ?>
but all the commands are not loading after this statement. I want to include another webpage into my homepage directly. my homepage is completely designed in php, but the other one is html or php.
i also tried <?php include("http://www.othersite.com/filename.html"); 开发者_如何学编程?>
but this html is not at all loading.
Possible Solution: ok this is what i am using
<iframe name="FRAMENAME" src="http://website.com/dropdown.html" width="1000" style="z-index:10000" height="40" frameborder="0" scrolling="no" allowautotransparency=true></iframe>
I am just including a dropdown menu for my index page. The CMS of the my site is restricting me from viewing the dorpdown in IE. When i view the dropdown.html page, i can see the dropdown, so I am trying to use iframe. Now using the iframe i can see the dropdown in IE as well, but the dropdown is not showing on the top. It is showing behind the other images on the site. How do i get it on top of the other images. z-index is not working for this.
This code requires allow_url_include=On
in your php.ini, which is disabled by default because it's REMOTE CODE EXECUTION, one of the worst you can have in PHP. This is called the Remote File Include (RFI) vulnerability. If there is PHP code on this site it will be executed on your server.
Extremely insecure:
<?php include("http://www.othersite.com/filename.html"); ?>
What you probably want is:
<?php print file_get_contents("http://www.othersite.com/filename.html"); ?>
However, this is technically an XSS vulnerability. So, if you trust the website there isn't a problem. But you probably want to run Html Purifer before printing it out.
Just a basic recommendation, but it sounds like you're trying to debug complex functionality within a complex environment, which will only make it harder.
Debugging is easier if you break it down into component steps. In this case, I recommend:
Display the iframe on a blank html page. Make sure everything works in that simple case.
Display on the more complex page.
If it's still not working, comment out the javascript on the complex page to determine if that is causing the adverse interaction with the iframe page's javascript.
Going through the debuggging stepwise like that should simplify the process.
精彩评论