how to get information from other website

Hi everyone.

i try to get this information from http://www.metoc.navy.mil/jtwc/products/abioweb.txt
i have done this before with WD it had this option.
But since i build the website new without using WD.
have anybody a idea how to scrape this info?
without using iframe.

Thank you

No need to ‘scrape’ – the URL you listed just returns raw text. You can embed it in a page with

<pre>
<?php 
readfile("http://www.metoc.navy.mil/jtwc/products/abioweb.txt");
?>
</pre>

This works great! thanks

and do you know, how to remove some text, like i would like to see only
2. SOUTH INDIAN OCEAN AREA (135E WEST TO COAST OF AFRICA):
and the tex below.
can i do this with php?

Thanks a lot

The short answer, is “yes, you could, but…”
The “but…” has to do with this human-created text posted in the URL above. They could easily change it so a match that worked for a while would cease working until they changed back to the format you expected.

IMHO, it’s better to post the entire content from the URL (and an attribution link would be polite to add) than to chase never-ending code updates due to human-caused format changes in the postings.

Thanks for feedback,

yes after your post i been checking,

<?php readfile and what we can do with it. deems like charakter count works, but as you said. if text change, it will mess the output as lines change. and it will change, when a warning will come in. In WD it worked with start and stop word. what is give here with title on no 2 and the end is NNNN hm, but what you have shown me here looks much better then i have done before =) This Lady did it very well to get the warnings and even spagett models from the tracks https://www.cyclocane.com/tropical-storm-risk/

There are also a couple of RSS feeds from Weather Underground you could use.

http://rss.wunderground.com/auto/rss_full/tropical/index.xml?basin=io (Indian Ocean)
http://rss.wunderground.com/auto/rss_full/tropical/index.xml?basin=ni (North Indian Ocean)
http://rss.wunderground.com/auto/rss_full/tropical/index.xml?basin=si (South Indian Ocean)

There is nothing active in those areas now but, there is activity right now in the Eastern Pacific feed so you can see what it looks like.

http://rss.wunderground.com/auto/rss_full/tropical/index.xml?basin=ep