PHP code or Iframe

by 1 replies
2
I used to embed a web page through Iframe, but using PHP code also it is possible,

on this php codes where i can get best information
#website design #code #iframe #php
  • With PHP there are a few things to consider. You could just use a function like include() with a URL reference, but that would create invalid HTML since the <html> and <head> tags of the remote page would be included. It's also HUGE security risk, since you would also be including scripts from the page too.

    The best way is to load up the remote page in a simpleXML() call then output the contents of the body tag using an xpath expression //html/body

    I hope that makes sense.
    Kevin

Next Topics on Trending Feed