I’m using file_get_contents to display external content.
It works for most websites but then I came across some it didn’t.
Here you can see one where it doesn’t: http://www.chusmix.com/game/frame.php?url=iknow.jp/home http://www.chusmix.com/game/frame.php?url=twitter.com
It seems the problem has to do with CSS but I cannot figure out what it is. Also I’m transforming relative paths to absolute ones. However It’s not a problem with my code since I tried just the file_get_contents and I still had the issue.
Any ideas of what could be the problem and how to solve it?
Thanks!
It is a problem with your code.
If you look at the source for that japanese site, you’ll notice that the URLs are pointing to
https://iknow.jp/stylesheets/base_packaged.cssbut in your frame it’s pointing tohttp://iknow.jp/home/stylesheets/base_packaged.cssNotice the extra
/home? It’s probably happening when you do the replacements.The twitter link you posted works for me.