RE: [PHP] Grabbing info from other Sites
Thanks for the info. It's a lot to digest for someone's who's just starting out. I always thought Pear was only a Fruit.. now I know better. I'll look through it and IF (& that's a big IF) i come up with something, of course I'll share it. Open Source all the way... Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Joel Rees [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 15, 2003 4:36 PM To: Ow Mun Heng; [EMAIL PROTECTED] Subject: Re: [PHP] Grabbing info from other Sites > The site really does > need Login. > > The thing is this, I'm developing for an internal site, (My dept) but I need > to access other dept's site to get info but unfortunately They won't give me > access to query the db directly. Prefering me to go through the site and > input accordingly to grab the data. > > I just find this to be "SO" troublesome as I need to get this data > for every week. Week In.. Week Out and for a lot of items.. Screen scraping for fun and profit! Anything you can type into a form in a web browser, you can throw at the server with a program (if you have enough time to write the program). In perl, there are LWP::UserAgent, HTTP::Request, HTTP::Cookies, HTTP::Response, URI, etc. In php, I don't see anything right offhand. But, there's always Pear, which is becoming php's CPAN, and pear has at least these two: http://www.pear.php.net/package-info.php?package=HTTP_Request http://www.pear.php.net/package-info.php?package=HTTP_Client and they look somewhat promising. You'll probably need ssl related classes for the https stuff; it looks like there's some support in Pear's encryption stuff. I'm sure the php community would appreciate it if you would build and share anything that's missing. ;-> > But I will take a look at SNOOPY. (hey.. isn't the name snoopy > copyrighted??) Trademarked, but only in relation to a cartoon character of a beagle and products based on the character, I think. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
Ow Mun Heng wrote, > Mind my ignorance but what is webservices?? http://www-106.ibm.com/developerworks/webservices/library/ws-starthere.html You don't really need to use http/HTML when talking machine-to-machine. XML is convenient and has some standards, but is also not necessary. Write a DTD that reveals the data you need. Write a little server script that reveals the data you want. Since you can't access the real data, use stubs for the access methods and hard code the data in your mock-server. Write a little client script that grabs the data from your mock-server script and passes it to your application. When that's running, encrypt the data stream from the server and decrypt in in the client. Brew up a little (encrypted) login-logout routine to increase their confidence level, then give all three to the other department and ask if they could either fill in the blanks or build their own version of the server. Then they control their side of the interface, both you and they control the DTD/encryption/login/logout together, and all you have to worry about is your client. > ... > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Monday, July 14, 2003 3:28 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Grabbing info from other Sites > > > Hello > The only way I can imageine is using curl and doing standard post get > requests. But this will put you at the mercy of the other dep. since a > change in design may force a change in your logic. > If you can, try to build a separate interface for your app which you can > use to interface the backend of the other deps. You might even consider > Webservices. This way you are independend of the design of the site. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
> In php, I don't see anything right offhand. http://www.php.net/curl -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
> The site really does > need Login. > > The thing is this, I'm developing for an internal site, (My dept) but I need > to access other dept's site to get info but unfortunately They won't give me > access to query the db directly. Prefering me to go through the site and > input accordingly to grab the data. > > I just find this to be "SO" troublesome as I need to get this data > for every week. Week In.. Week Out and for a lot of items.. Screen scraping for fun and profit! Anything you can type into a form in a web browser, you can throw at the server with a program (if you have enough time to write the program). In perl, there are LWP::UserAgent, HTTP::Request, HTTP::Cookies, HTTP::Response, URI, etc. In php, I don't see anything right offhand. But, there's always Pear, which is becoming php's CPAN, and pear has at least these two: http://www.pear.php.net/package-info.php?package=HTTP_Request http://www.pear.php.net/package-info.php?package=HTTP_Client and they look somewhat promising. You'll probably need ssl related classes for the https stuff; it looks like there's some support in Pear's encryption stuff. I'm sure the php community would appreciate it if you would build and share anything that's missing. ;-> > But I will take a look at SNOOPY. (hey.. isn't the name snoopy > copyrighted??) Trademarked, but only in relation to a cartoon character of a beagle and products based on the character, I think. -- Joel Rees, programmer, Kansai Systems Group Altech Corporation (Alpsgiken), Osaka, Japan http://www.alpsgiken.co.jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Antwort: RE: [PHP] Grabbing info from other Sites
Hello Webservices is the use of SOAP over HTTP to bring a Service to the web. There are a lot more technologies involved like WSDL and UDDI but basically it is a way of providing the functionality of a programm/application to the web over a well defined interface. Since it is an additional layer between the app and the web which is pretty light weight it is an easy way to bring services to the web. And since SOAP is XML based it is language independend. There are SOAP Clients for Perl, PHP, Java, .NET (VB, C#, ASP) etc... Hope that clears things up Regards Stefan Langer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
Ow Mun Heng <[EMAIL PROTECTED]> wrote: > Hi, > > Mind my ignorance but what is webservices?? hmm... I was wondering that myself... http://www.w3.org/2002/ws/ A google search on 'Web Services stock quote' returns some interesting pages. > > Cheers, > Mun Heng, Ow > H/M Engineering > Western Digital M'sia > DID : 03-7870 5168 > Curt -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Grabbing info from other Sites
Hi, Mind my ignorance but what is webservices?? Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 3:28 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Grabbing info from other Sites Hello The only way I can imageine is using curl and doing standard post get requests. But this will put you at the mercy of the other dep. since a change in design may force a change in your logic. If you can, try to build a separate interface for your app which you can use to interface the backend of the other deps. You might even consider Webservices. This way you are independend of the design of the site. Regards Stefan Langer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
Hello The only way I can imageine is using curl and doing standard post get requests. But this will put you at the mercy of the other dep. since a change in design may force a change in your logic. If you can, try to build a separate interface for your app which you can use to interface the backend of the other deps. You might even consider Webservices. This way you are independend of the design of the site. Regards Stefan Langer -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
Why don't you use MSN services to get quotes. MSN does care for login. I am using this to get quotes after 15 minutes on my Cell Phone. I am using culr functions to get it. Suhas _ Encrypt your PHP code for FREE at http://encphp.sspsoft.com _ - Original Message - From: "Ow Mun Heng" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 13, 2003 7:43 PM Subject: [PHP] Grabbing info from other Sites Hi, I have this need/want to grab information from sites for my own usage and wondering how to do it. Here's an example. 1. Log into finance.yahoo.com (assuming I need to log on) 2. Type the list of shares I want 3. Let Yahoo process it 4. Use PHP or some other scripting language to pull the data and put it into my database. Is this possible at all? Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Sunday, July 13, 2003 10:58 PM To: [EMAIL PROTECTED] Subject: php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 Topics (messages 154985 through 155003): Re: touch file on shared web server? 154985 by: Paul O'Neil 154991 by: Jason Wong Re: Code and Good Design Methods 154986 by: zbranigan 154987 by: zbranigan 154988 by: Dan J. Rychlik 154994 by: Ray Hunter 154995 by: Robert Cummings Re: OK, So I am new to these List. Win2000 help! 154989 by: John Nichel 155002 by: John Nichel Re: Newbie Directory question 154990 by: olinux Re: Mailing list server with PHP frontend 154992 by: Juan Nin 154993 by: Manuel Lemos 154996 by: Paul Chvostek How does PHP interact when using Java? 154997 by: Jan Bro Weird Date problem driving me crazy... 154998 by: Boaz Yahav php script billing receipt 154999 by: Duncan Re: Need PHP on Win2000 Pro 155000 by: Burhan Khalid 155001 by: John A. Thomason Re: dump $_POST into variables 155003 by: Marek Kilimajer Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Grabbing info from other Sites
Hi, Unfortunately, Yahoo.com is just an example.. The site really does need Login. The thing is this, I'm developing for an internal site, (My dept) but I need to access other dept's site to get info but unfortunately They won't give me access to query the db directly. Prefering me to go through the site and input accordingly to grab the data. I just find this to be "SO" troublesome as I need to get this data for every week. Week In.. Week Out and for a lot of items.. But I will take a look at SNOOPY. (hey.. isn't the name snoopy copyrighted??) Cheers, Mun Heng, Ow H/M Engineering Western Digital M'sia DID : 03-7870 5168 -Original Message- From: Michael Geier [mailto:[EMAIL PROTECTED] Sent: Monday, July 14, 2003 9:47 AM To: Ow Mun Heng Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Grabbing info from other Sites assuming the login isn't necessary (which it probably is), you could use something like Snoopy (http://sourceforge.net/projects/snoopy/) to POST/GET the required web page and process as required. Quoting Ow Mun Heng <[EMAIL PROTECTED]>: > Hi, > > I have this need/want to grab information from sites for my own > usage and wondering how to do it. > > Here's an example. > > 1. Log into finance.yahoo.com (assuming I need to log on) > 2. Type the list of shares I want > 3. Let Yahoo process it > 4. Use PHP or some other scripting language to pull the data and put it into > my database. > > Is this possible at all? > > > > Cheers, > Mun Heng, Ow > H/M Engineering > Western Digital M'sia > DID : 03-7870 5168 > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 13, 2003 10:58 PM > To: [EMAIL PROTECTED] > Subject: php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 > > > > php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 > > Topics (messages 154985 through 155003): > > Re: touch file on shared web server? > 154985 by: Paul O'Neil > 154991 by: Jason Wong > > Re: Code and Good Design Methods > 154986 by: zbranigan > 154987 by: zbranigan > 154988 by: Dan J. Rychlik > 154994 by: Ray Hunter > 154995 by: Robert Cummings > > Re: OK, So I am new to these List. Win2000 help! > 154989 by: John Nichel > 155002 by: John Nichel > > Re: Newbie Directory question > 154990 by: olinux > > Re: Mailing list server with PHP frontend > 154992 by: Juan Nin > 154993 by: Manuel Lemos > 154996 by: Paul Chvostek > > How does PHP interact when using Java? > 154997 by: Jan Bro > > Weird Date problem driving me crazy... > 154998 by: Boaz Yahav > > php script billing receipt > 154999 by: Duncan > > Re: Need PHP on Win2000 Pro > 155000 by: Burhan Khalid > 155001 by: John A. Thomason > > Re: dump $_POST into variables > 155003 by: Marek Kilimajer > > Administrivia: > > To subscribe to the digest, e-mail: > [EMAIL PROTECTED] > > To unsubscribe from the digest, e-mail: > [EMAIL PROTECTED] > > To post to the list, e-mail: > [EMAIL PROTECTED] > > > -- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > === Michael Geier CDM Sports, Inc. Systems Administration email: [EMAIL PROTECTED] phone: 314.692.3540 --- This email sent using CDM Sports Webmail v3.1 [ http://webmail.cdmsports.com ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Grabbing info from other Sites
assuming the login isn't necessary (which it probably is), you could use something like Snoopy (http://sourceforge.net/projects/snoopy/) to POST/GET the required web page and process as required. Quoting Ow Mun Heng <[EMAIL PROTECTED]>: > Hi, > > I have this need/want to grab information from sites for my own > usage and wondering how to do it. > > Here's an example. > > 1. Log into finance.yahoo.com (assuming I need to log on) > 2. Type the list of shares I want > 3. Let Yahoo process it > 4. Use PHP or some other scripting language to pull the data and put it into > my database. > > Is this possible at all? > > > > Cheers, > Mun Heng, Ow > H/M Engineering > Western Digital M'sia > DID : 03-7870 5168 > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Sunday, July 13, 2003 10:58 PM > To: [EMAIL PROTECTED] > Subject: php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 > > > > php-general Digest 13 Jul 2003 14:58:27 - Issue 2173 > > Topics (messages 154985 through 155003): > > Re: touch file on shared web server? > 154985 by: Paul O'Neil > 154991 by: Jason Wong > > Re: Code and Good Design Methods > 154986 by: zbranigan > 154987 by: zbranigan > 154988 by: Dan J. Rychlik > 154994 by: Ray Hunter > 154995 by: Robert Cummings > > Re: OK, So I am new to these List. Win2000 help! > 154989 by: John Nichel > 155002 by: John Nichel > > Re: Newbie Directory question > 154990 by: olinux > > Re: Mailing list server with PHP frontend > 154992 by: Juan Nin > 154993 by: Manuel Lemos > 154996 by: Paul Chvostek > > How does PHP interact when using Java? > 154997 by: Jan Bro > > Weird Date problem driving me crazy... > 154998 by: Boaz Yahav > > php script billing receipt > 154999 by: Duncan > > Re: Need PHP on Win2000 Pro > 155000 by: Burhan Khalid > 155001 by: John A. Thomason > > Re: dump $_POST into variables > 155003 by: Marek Kilimajer > > Administrivia: > > To subscribe to the digest, e-mail: > [EMAIL PROTECTED] > > To unsubscribe from the digest, e-mail: > [EMAIL PROTECTED] > > To post to the list, e-mail: > [EMAIL PROTECTED] > > > -- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > === Michael Geier CDM Sports, Inc. Systems Administration email: [EMAIL PROTECTED] phone: 314.692.3540 --- This email sent using CDM Sports Webmail v3.1 [ http://webmail.cdmsports.com ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php