Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 03-16-2006, 03:45 AM ASX Script
Junior Talker

Posts: 2
Trades: 0
Is there a way i can make a script on a webpage that does this:
extract this bit of html
</th><td class='last'>"10.400"</td><td class='change
(i put the bit i wanted to extract in ")
from this webpage
http://www.asx.com.au/asx/markets/Pr...1&ASXCodes=CML
and then multiply the number it extracts by about around 3,000?
and i would like the webpage to look like this
CML: 10.400 x 3,000 = 31,200
Any ideas? (i would like to create this in dreamweaver)
Sorry but i dont know where to start with this
Sacky is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-17-2006, 12:15 PM Re: ASX Script
ChipJohns's Avatar
I don't know! Do you?

Posts: 488
Name: Chip Johns
Location: Savannah Georgia
Trades: 0
Your question doesn't make any sense to me?

What are you trying to accomplish?


It kind of looks like a rogue post that is just squeaking by as something no one
understands and is actually spamming a link out of the post. Sorry, its just what
this looks like.

What are you trying to accomplish so that we can help?
ChipJohns is offline
Reply With Quote
View Public Profile Visit ChipJohns's homepage!
 
Old 04-01-2006, 06:07 AM Re: ASX Script
Junior Talker

Posts: 2
Trades: 0
Sorry i didnt mean to poorly word my question
but what i want to do is spider a webpage for a bit of information and then display it on a PHP website
i got some coding from another site
In perl:
<%
use LWP::Simple;
use strict;
my $server = 'http://www.asx.com.au';
my $url = '/asx/markets/PriceResults.jsp';
my $args = '?method=get&template=F1001&ASXCod* es=CML';
my $content = get("$server$url$args");
if (defined $content) {
my ($str) = ($content =~ /<td\s+class='last'>\s*([0-9* \]+)\s*<\/td>/si);
if (defined $str) {
my $num = $str; $num =~ s/\.//g;
my $res = $num * 3;
my $sres = sprintf('%.3f', $res/1000);
$sres =~ s/\./,/;
%>CML: <%= $str %> x 3,000 = <%= $sres %> <%
} else {
%>Not readable<%
}
} else {
%>Not available<%
}
%>
In PHP:
if ($page = file_get_contents('http://www.asx.* com.au/asx/markets/PriceResults.js* p?method=get&template=F1001&ASXCod* es=CML')) {
if (preg_match('|<td\s+class=\'las* t\'>([0-9]*)</td>|i', $page, $match)) {
$price = $match[1];
echo $price;
}
}
and heres my server stats
Operating system Linux Service Status Click to View Kernel version 2.6.9-22.0.1.ELsmp Machine Type i686 Apache version 1.3.34 (Unix) PERL version 5.8.7 Path to PERL /usr/bin/perl Path to sendmail /usr/sbin/sendmail Installed Perl Modules Click to View PHP version 4.4.1 MySQL version 4.1.14-standardi would appreciate your help on this issue because i have never got those 2 pieces of code to work no matter what i do
Sacky is offline
Reply With Quote
View Public Profile
 
Old 04-01-2006, 10:13 PM Re: ASX Script
Novice Talker

Posts: 10
Trades: 0
sounds complicated.
__________________
The very best
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
gretty is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to ASX Script
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54639 seconds with 12 queries