optikalefx Posted December 11, 2007 Share Posted December 11, 2007 Hey guys, i was wondering if anyone has ideas on how to load webpages inside a div. And moreover, how to scale the content to the constraints of the div. For example, there is a javascript demo on dynamic drive, but those file have to be local for it to work, also in example on my ipod Touch safari scales webpages to fit its screen, i kind of want to mimic that action in a div, scale the site down. Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/ Share on other sites More sharing options...
therealwesfoster Posted December 11, 2007 Share Posted December 11, 2007 You could use iframes.. that would work Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412193 Share on other sites More sharing options...
optikalefx Posted December 11, 2007 Author Share Posted December 11, 2007 ok, but can you dynamically change the size of the iframe? Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412229 Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 you need to use either AJAX/PHP (or alternate sever side language) or just plan PHP (or alternate sever side language) to get the content dynamically in a div. to make the content fit to your div; set your div's overflow style to either auto or scroll. Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412254 Share on other sites More sharing options...
optikalefx Posted December 11, 2007 Author Share Posted December 11, 2007 No way to scale the content? I cant use anything but Javascript. Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412314 Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 your not going to be able to load a web page's content in a div without a server side language and javascript working together. about the only option you have is going with the iframe in the div. Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412331 Share on other sites More sharing options...
optikalefx Posted December 11, 2007 Author Share Posted December 11, 2007 ok, then is there anyway to mock screen cap a website, and save it as a thumbnail image? that would give me the same effect. I was looking at the <canvas> tag for some logic on this. Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412336 Share on other sites More sharing options...
phpQuestioner Posted December 11, 2007 Share Posted December 11, 2007 ok, then is there anyway to mock screen cap a website, and save it as a thumbnail image? that would give me the same effect. I was looking at the <canvas> tag for some logic on this. what? Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412343 Share on other sites More sharing options...
optikalefx Posted December 12, 2007 Author Share Posted December 12, 2007 my goal is to have mini divs that i can drag around the screen, and the divs are thumbnails of websites. but they are updated when a website is updated, so it would need to "screenshot" a website and then generate a thumbnail. this is difficult Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412441 Share on other sites More sharing options...
phpQuestioner Posted December 12, 2007 Share Posted December 12, 2007 best I can tell you is - "Google It". your going to have to have a server side language to create a dynamic screen shots; unless you use static images and that will not automatically change if the site is updated. Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412449 Share on other sites More sharing options...
BenInBlack Posted December 12, 2007 Share Posted December 12, 2007 i found these links http://brad.livejournal.com/2015327.html http://khtml2png.sourceforge.net/ Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412508 Share on other sites More sharing options...
optikalefx Posted December 12, 2007 Author Share Posted December 12, 2007 my server is down i cant test at the moment, but is that first one purly php? where does it save to? Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412551 Share on other sites More sharing options...
BenInBlack Posted December 12, 2007 Share Posted December 12, 2007 these are server side processes like phpQuestioner was referring to, they use command lines to call browser rendering engines and then send the output of browser to like imagemagick to thumbnail it. it the first case they are using vncserver which is stock on Linux server Link to comment https://forums.phpfreaks.com/topic/81197-load-a-webpage-inside-a-div/#findComment-412627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.