Importing HTML and manipulating data?

This is a discussion on "Importing HTML and manipulating data?" within the PHP Forum section. This forum, and the thread "Importing HTML and manipulating data? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 29th, 2006, 12:20
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Importing HTML and manipulating data?

I want to import data from a table on this page:
http://www.bom.gov.au/products/IDN65066.shtml

It's updated every 10 minutes and contains temperatures and wind speeds of areas in Australia. The page is never renamed, always is the same link. I want to create a really simple page on one of my sites that will only show specific details for one location.

So I want to be able to somehow import the data from that table, then pull out something that would end up looking like this:

Quote:
Badgerys Creek
Current wind speed: 6 knots (SW)
Current temperature: 10.0
That's all I want to display. The page will be really only for my own purposes - I want to be able to check this info from my mobile phone without having to scroll through all the other crap in that table (I kitesurf).

Can anyone help me? Will HTML Tidy do it? If so, how?
Reply With Quote

  #2 (permalink)  
Old Aug 29th, 2006, 12:27
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Importing HTML and manipulating data?

you got PHP, or ASP?
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #3 (permalink)  
Old Aug 29th, 2006, 12:32
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Re: Importing HTML and manipulating data?

PHP. You have a solution Rob?
Reply With Quote
  #4 (permalink)  
Old Aug 31st, 2006, 00:56
Tim356's Avatar
Reputable Member
Join Date: Nov 2003
Location: Australia
Age: 25
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Tim356
Re: Importing HTML and manipulating data?

Solved. Rob, you should probably move this to the PHP forum now as it doesn't have much to do with html anymore.

PHP: Select all

<?php

$url 
"http://www.bom.gov.au/products/IDN65066.shtml";

$page implode('',file($url));

$start strpos ($page'Tuggeranong,');
$end strpos ($page'-->'$start);
//$text = substr ($page, 0, $start) . substr ($page, $end+3);
$text substr ($page$start+12$end-($start+12));
?>
Reply With Quote
  #5 (permalink)  
Old Aug 31st, 2006, 08:54
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Importing HTML and manipulating data?

yup... that easy
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
Reply

Tags
importing, html, manipulating, data

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
405 error passing data from html to php nate2099 Starting Out 2 Apr 9th, 2007 22:18
Importing list using only HTML? EdgeWalker Web Page Design 0 Feb 8th, 2007 20:44
HTML to display data on plasma screen JTWork Web Page Design 6 Dec 21st, 2006 15:37
Manipulating parent window ClaireB JavaScript Forum 1 Nov 11th, 2005 11:44
HELP!!!Fireworks Html importing into Dreamweaver brannan1127 Web Page Design 4 Jan 6th, 2004 15:26


All times are GMT. The time now is 06:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43