RE: [PHP] Grabbing dynamic pages

2001-09-07 Thread Joseph Blythe

thanks again all,

The data will be the whole web page and I have to extract out the current
share pricing etc, probaly grab thier sexy chart as well (was told you can
take what you want as long as you use thier guidlines which they provide
apon contact) I suppose I could use imlib or gd to generate my own graphs as
well joy (c:

I was told by our Internet manager that the problem does lies in our
protection on our border ie: firewall, once he has allowed me some access to
the outside world I should be able to do this :-) I'm sure I will have
plenty of questions when it comes time to parse the html (oh my god).

Regards

Joseph

-Original Message-
From: Donny Yap [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 4:55 PM
To: Joseph Blythe
Subject: RE: [PHP] Grabbing dynamic pages


Yes,

This shouldn't be too hard to do; work out what type of data it is you're
grabbing from the ASX site - ie. is it just that image, or is there a form
or something?

You can open the page directly in PHP using fopen,
Regexp will let you grab out whatever the data is...
An alternative is to use strip_tags

Hope that helps some,
Donny


> -Original Message-
> From: Joseph Blythe [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 7 September 2001 3:14 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Grabbing dynamic pages
>
>
> Hey all,
>
> I got a bit of a problem I need to be able to grab info (which has been
> approved) from the Australian Stock Exchange Website (www.asx.com.au) all
> they say about this in the information they sent me is:
>
> "To obtain your share price data you will need to get your IT department
> to write a java object or a com active x object to strip out the
> unnecessary
> html so that you are just left with your share price information."
>
> LOL I am the IT department (well part of it) and I don't use or would even
> recommend using these products not that there is anything wrong with them,
> furthermore even if I did this does not help me very much (c:
>
> I was sort of wondering if there is a way to do this sort of
> thing with PHP?
> the only other information I have is the URL in the form of:
>
> http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsS
> earch.jsp?
> searchBy=asxCode&TimeFrame=D&asxCode=ASX
>
> I tried a quick test using the filesystem functions with no success, I was
> sort of hoping for a 'Yes' / 'No" answer maybe if 'Yes' just a quick
> explanation.
>
> Any help would be much much appreciated.
>
> Regards,
>
> Joseph Blythe
> Web Development
>
> BoldFX / Binary Logic
> The LOGICAL Choice!
> 750 Port Road Beverley
> Phone: +61 08 8244 1800
> Fax: +61 08 8244 1811
> mailto:[EMAIL PROTECTED]
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Joseph Blythe

This is true this is exactly why i try and find a solution here first (with
PHP), my bosses attitude was to hire java programmers i said 'why?'.

I also noticed getss which strips stuff on the read which is kinda cool too
(c:

Joseph

-Original Message-
From: David Robley [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 3:02 PM
To: Joseph Blythe; [EMAIL PROTECTED]
Subject: Re: [PHP] Grabbing dynamic pages


On Fri,  7 Sep 2001 14:44, Joseph Blythe wrote:
> Hey all,
>
> I got a bit of a problem I need to be able to grab info (which has been
> approved) from the Australian Stock Exchange Website (www.asx.com.au)
> all they say about this in the information they sent me is:
>
> "To obtain your share price data you will need to get your IT
> department to write a java object or a com active x object to strip out
> the unnecessary html so that you are just left with your share price
> information."
>
> LOL I am the IT department (well part of it) and I don't use or would
> even recommend using these products not that there is anything wrong
> with them, furthermore even if I did this does not help me very much
> (c:
>
> I was sort of wondering if there is a way to do this sort of thing with
> PHP? the only other information I have is the URL in the form of:
>
> http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsSearch
>.jsp? searchBy=asxCode&TimeFrame=D&asxCode=ASX
>
> I tried a quick test using the filesystem functions with no success, I
> was sort of hoping for a 'Yes' / 'No" answer maybe if 'Yes' just a
> quick explanation.
>
> Any help would be much much appreciated.
>
> Regards,
>
> Joseph Blythe
> Web Development

Seems like PHP has something to do just about anything; in this case you
may find striptags is just the bee's knees.

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

   Real Programmers aren't afraid to use GOTO's.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Joseph Blythe

hmm just tried exact code still same error, I am going to have to have a
little talk to our internet manager as he has done some pretty nasty stuff
to our border. what i do find starnge is no errors are produced when I
exclude all the query stuff eg:

$fp = fopen("http://www.asx.com.au","r";);

Thanks again,

Joseph

-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Sent: Friday, 7 September 2001 3:18 PM
To: Joseph Blythe
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Grabbing dynamic pages

This script worked fine for me here:

http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInf
oSearchResults.jsp?searchBy=asxCode&allinfo=on&asxCode=asx&companyName=&prin
cipalActivity=&industryGroup=0","r");
while(!feof($fp)) echo fgets($fp,1024);
fclose($fp);
?>

Firewall in the way perhaps?

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Grabbing dynamic pages

2001-09-06 Thread David Robley

On Fri,  7 Sep 2001 14:44, Joseph Blythe wrote:
> Hey all,
>
> I got a bit of a problem I need to be able to grab info (which has been
> approved) from the Australian Stock Exchange Website (www.asx.com.au)
> all they say about this in the information they sent me is:
>
> "To obtain your share price data you will need to get your IT
> department to write a java object or a com active x object to strip out
> the unnecessary html so that you are just left with your share price
> information."
>
> LOL I am the IT department (well part of it) and I don't use or would
> even recommend using these products not that there is anything wrong
> with them, furthermore even if I did this does not help me very much
> (c:
>
> I was sort of wondering if there is a way to do this sort of thing with
> PHP? the only other information I have is the URL in the form of:
>
> http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsSearch
>.jsp? searchBy=asxCode&TimeFrame=D&asxCode=ASX
>
> I tried a quick test using the filesystem functions with no success, I
> was sort of hoping for a 'Yes' / 'No" answer maybe if 'Yes' just a
> quick explanation.
>
> Any help would be much much appreciated.
>
> Regards,
>
> Joseph Blythe
> Web Development

Seems like PHP has something to do just about anything; in this case you 
may find striptags is just the bee's knees.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Real Programmers aren't afraid to use GOTO's.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Rasmus Lerdorf

This script worked fine for me here:

http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInfoSearchResults.jsp?searchBy=asxCode&allinfo=on&asxCode=asx&companyName=&principalActivity=&industryGroup=0","r";);
while(!feof($fp)) echo fgets($fp,1024);
fclose($fp);
?>

Firewall in the way perhaps?

-Rasmus

On Fri, 7 Sep 2001, Joseph Blythe wrote:

> Thanks all (c:
>
> > Why don't they make this available via XML?  Parsing HTML is painful.
>
> Was my exact question to them (c:
>
> > That just shows a chart.  How are you supposed to parse anything out of
> > that?
>
> Hehe I provided the wrong url should something like:
>
> http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInfoSearch
> Results.jsp?searchBy=asxCode&allinfo=on&asxCode=asx&companyName=&principalAc
> tivity=&industryGroup=0
>
> I tried it as suggested heres the output:
>
> Warning: php_hostconnect: connect failed in /home/asx/public_html/index.php
> on line 9
>
> Warning:
> fopen("http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInf
> oSearchResults.jsp?searchBy=asxCode&allinfo=on&asxCode=asx&companyName=&prin
> cipalActivity=&industryGroup=0","r") - Bad file descriptor in
> /home/asx/public_html/index.php on line 9
>
> Trust them to make it as hard as possible using Java Slowdown Pages :-))
>
> Will keep trying.
>
> Regards,
>
> Joseph
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Grabbing dynamic pages

2001-09-06 Thread Joseph Blythe

Thanks all (c:

> Why don't they make this available via XML?  Parsing HTML is painful.

Was my exact question to them (c:

> That just shows a chart.  How are you supposed to parse anything out of
> that?

Hehe I provided the wrong url should something like:

http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInfoSearch
Results.jsp?searchBy=asxCode&allinfo=on&asxCode=asx&companyName=&principalAc
tivity=&industryGroup=0

I tried it as suggested heres the output:

Warning: php_hostconnect: connect failed in /home/asx/public_html/index.php
on line 9

Warning:
fopen("http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/CompanyInf
oSearchResults.jsp?searchBy=asxCode&allinfo=on&asxCode=asx&companyName=&prin
cipalActivity=&industryGroup=0","r") - Bad file descriptor in
/home/asx/public_html/index.php on line 9

Trust them to make it as hard as possible using Java Slowdown Pages :-))

Will keep trying.

Regards,

Joseph



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Grabbing dynamic pages

2001-09-06 Thread Rasmus Lerdorf

> "To obtain your share price data you will need to get your IT department
> to write a java object or a com active x object to strip out the unnecessary
> html so that you are just left with your share price information."

Why don't they make this available via XML?  Parsing HTML is painful.

> I was sort of wondering if there is a way to do this sort of thing with PHP?
> the only other information I have is the URL in the form of:
>
> 
>http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsSearch.jsp?searchBy=asxCode&TimeFrame=D&asxCode=ASX

That just shows a chart.  How are you supposed to parse anything out of
that?

> I tried a quick test using the filesystem functions with no success, I was
> sort of hoping for a 'Yes' / 'No" answer maybe if 'Yes' just a quick
> explanation.

$fp =
fopen('http://www.asx.com.au/scripts/nd_ISAPI_50.dll/asx/research/chartsSearch.jsp?searchBy=asxCode&TimeFrame=D&asxCode=ASX','r');

should work just fine to get the HTML.

-Rasmus


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]