T
tmp1235711
I have tried for the past several hours to figure out what I need to
get all fo the data on this web page:
http://alaron.com/quotes.php?quote=forex but I am unable to get the
price data. Here is my code:
use warnings;
use Fcntl;
#use strict;
package MAIN;
require LWP::UserAgent; # reads the DATA in as one long string
with embedded logical new lines
$ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
open (RAW_HTML, ">raw html from lwp_00.txt") ||
die "unable to open the master file $!";
# web site/page desired: http://alaron.com/quotes.php?quote=forex
$market_array[0] = "forex";
### read in next symbol and the expiration dates then push expire
dates to array
foreach $market (@market_array) {
$response =
$ua->get("http://alaron.com/quotes.php?quote=$market");
$html_response = $response->content;
print $html_response;
print RAW_HTML $html_response;
}
# is not getting the price data, any help would be most appreciated
# I have also tried using a socket connection also - partial code:
# $sym_url = "/quotes.php?quote=forex";
# START_SOCKET: $socket = IO::Socket::INET->new
# ( PeerAddr => 'alaron.com',
# PeerPort => 80,
# Proto => 'tcp',
# Type => SOCK_STREAM,
# Reuse => 1)
# ;
get all fo the data on this web page:
http://alaron.com/quotes.php?quote=forex but I am unable to get the
price data. Here is my code:
use warnings;
use Fcntl;
#use strict;
package MAIN;
require LWP::UserAgent; # reads the DATA in as one long string
with embedded logical new lines
$ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
open (RAW_HTML, ">raw html from lwp_00.txt") ||
die "unable to open the master file $!";
# web site/page desired: http://alaron.com/quotes.php?quote=forex
$market_array[0] = "forex";
### read in next symbol and the expiration dates then push expire
dates to array
foreach $market (@market_array) {
$response =
$ua->get("http://alaron.com/quotes.php?quote=$market");
$html_response = $response->content;
print $html_response;
print RAW_HTML $html_response;
}
# is not getting the price data, any help would be most appreciated
# I have also tried using a socket connection also - partial code:
# $sym_url = "/quotes.php?quote=forex";
# START_SOCKET: $socket = IO::Socket::INET->new
# ( PeerAddr => 'alaron.com',
# PeerPort => 80,
# Proto => 'tcp',
# Type => SOCK_STREAM,
# Reuse => 1)
# ;