plarzlover Posted June 14, 2007 Share Posted June 14, 2007 Hi I have a shoutbox at www.plarz.it in the middle of the page... it always worked by including the page http://www.plarz.it/shouter/db then i discovered that by using frames the shoutbox content wasn't crawled by google... so I needed something to include the first N lines of /shouter/db to the main page index.php I came up with this solution.. I put in index.php the following <?php $shoutbox = "shouter/db"; $fh = fopen($shoutbox, 'r'); $shoutposts = fread($fh, 1500); fclose($fh); echo $shoutposts; ?> this works however sometimes it cuts posted flash videos and long codes like <embed src="http://widget-c7.slide.com/widgets/slideticker.swf" type="application/x-shockwave-flash" quality="high" scale="noscale" salign="l" wmode="transparent" flashvars="site=widget-c7.slide.com&channel=288230376161191367&cy=be&il=1" width="400" height="300" name="flashticker" align="middle"/><div style="width:400px;text-align:left;"> is there a way to make it include the first N lines without cutting html objects???? Link to comment https://forums.phpfreaks.com/topic/55559-shoutbox-include-html-page-without-breakign-code/ Share on other sites More sharing options...
plarzlover Posted June 15, 2007 Author Share Posted June 15, 2007 otherwise the page would get enormous to fit in the main page!!! Link to comment https://forums.phpfreaks.com/topic/55559-shoutbox-include-html-page-without-breakign-code/#findComment-275177 Share on other sites More sharing options...
GingerRobot Posted June 15, 2007 Share Posted June 15, 2007 Im a bit confused - do you not want any HTML content in your shoutbox so you dont get videos etc in it? If so, i would suggest you remove all the HTML tags on the input to the shoutbox using strip_tags() Link to comment https://forums.phpfreaks.com/topic/55559-shoutbox-include-html-page-without-breakign-code/#findComment-275188 Share on other sites More sharing options...
GingerRobot Posted June 15, 2007 Share Posted June 15, 2007 Oh sorry, i think i got the wrong end of the stick. You do want all the HTML including videos? Just where the codes span multiple lines, they get broken up and only half of it ends up being put in your shoutbox? Link to comment https://forums.phpfreaks.com/topic/55559-shoutbox-include-html-page-without-breakign-code/#findComment-275189 Share on other sites More sharing options...
plarzlover Posted June 15, 2007 Author Share Posted June 15, 2007 oh yes... because I had a function which didn't break html code by checking that when a "<" was opened it had to have a ">" but with nested objects it obviously doesn't work!!! Link to comment https://forums.phpfreaks.com/topic/55559-shoutbox-include-html-page-without-breakign-code/#findComment-275209 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.