By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

Q: Extract only text lines visible in webbrowser?

P: n/a
I need to web query for further processing, f.ex

http://moneycentral.msn.com/investor...MBOL=F,MSFT,DE

I use

<?php
$MSN="http://moneycentral.msn.com/investor/external/excel/quotes.asp?SYMBOL=";
$QSymbols="F,MSFT,DE";
$QStr="$MSN"."$QSymbols";
$lines = file ($QStr);
?>

However, the relevant information is only 3 lines on the webpage, but
more than 1000 lines in $lines, so it is slow and tedious to work
with. Is there any way to extract only the lines visible in the
browser?

Flemse
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sat, 18 Dec 2004 09:24:43 -0500, Flemse hath writ:
I need to web query for further processing, f.ex

http://moneycentral.msn.com/investor...MBOL=F,MSFT,DE

I use

<?php
$MSN="http://moneycentral.msn.com/investor/external/excel/quotes.asp?SYMBOL=";
$QSymbols="F,MSFT,DE";
$QStr="$MSN"."$QSymbols";
$lines = file ($QStr);
?>

However, the relevant information is only 3 lines on the webpage, but
more than 1000 lines in $lines, so it is slow and tedious to work
with. Is there any way to extract only the lines visible in the
browser?

Flemse


You need something like:

$ lynx --dump --nolist --width=255 \
http://moneycentral.msn.com/investor...MBOL=F,MSFT,DE

But, there's way more than your "...only 3 lines on the webpage".

Poke around with:
http://us2.php.net/manual/en/function.passthru.php
http://us2.php.net/manual/en/function.system.php
http://us2.php.net/manual/en/function.exec.php

Jonesy
--
| Marvin L Jones | jonz | W3DHJ | linux
| Gunnison, Colorado | @ | Jonesy | OS/2 __
| 7,703' -- 2,345m | config.com | DM68mn SK
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.