PDA

View Full Version : Does Text and/or Image Crawler Script v1.5 support a php input file?



retiredguru
05-15-2013, 03:41 PM
Hi All,

I'd like to use "Text and/or Image Crawler Script v1.5" on a website I'm creating but I have a question. I need to have it read an input .php file
that I get from another site. Here is the code I'm using at the moment:

<iframe NAME="Alert1" width="958" height="20" scrolling="no" src="http://pages.sssnet.com/kend/alert.php"></iframe>

As you see, it is in an iframe, and unfortunately is formatted so it will not scroll in firefox (I need to fix that!) I'd appreciate any help you can give me on this.

Thanks,

RetiredGuru...

jscheuer1
05-15-2013, 04:02 PM
No. Access to the contents of an off site page in an iframe is denied to javascript. If your host has PHP 5+ and allows remote file reads, you can use a file_get_contents() on the remote file and some javascript on the result to put it's content into a Crawler on your page. But only if you have permission from the remote host to do that. Otherwise you are violating their implied copyright.


Added Later:
It just occurred to me that an iframe is an inline element, so you don't need to do anything special. Just put the iframe in the crawler. The script should do the rest:


<div id="mycrawler" class="marquee">
<iframe NAME="Alert1" width="958" height="20" scrolling="no" frameborder=0 src="http://pages.sssnet.com/kend/alert.php"></iframe>
</div>

And you don't want it to have scrollbars, so that part is fine. Just follow the above with your chosen init, something like:


<script type="text/javascript">
marqueeInit({
uniqueid: 'mycrawler',
style: {
'padding': '5px',
'width': '450px',
'background': 'black',
'border': '1px solid #CC3300'
},
inc: 5, //speed - pixel increment for each iteration of this marquee's movement
mouse: 'cursor driven', //mouseover behavior ('pause' 'cursor driven' or false)
moveatleast: 2,
neutral: 150,
persist: true,
savedirection: true
});
</script>

Best place for that is right before the closing </body> tag of the page.

Even with this method, make sure you have the right to display that other site's content before proceeding.