RE: [PHP] zip and USPS
| From: | Ruy P. Delgado | Date: | Mon, 17 Jul 2000 22:55:07 +0000 |
| Subject: | RE: [PHP] zip and USPS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6976@lists.php.net to get a copy of this message | ||
Hey Hans,
Thanks, I found the PostToHost function =)
Now the thing is finding out the correct way to input the form, keep getting
these anoying 500 errors =)
Thanks again, i'm at your site, nice stuff.
PHP is great.
Ruy
-----Original Message-----
From: Hans H. Anderson [mailto:hans@hansanderson.com]
Sent: Monday, July 17, 2000 11:19 AM
To: php-general@lists.php.net
Subject: [PHP] zip and USPS
On Mon, 17 Jul 2000, Ruy P. Delgado wrote:
> I can do a js that would Table1Form.submit() with my database fields but
> how exactly can I get this information into PHP variables? how can I parse
> the resulting page from the usps site?
Just jumping in here, Ruy, but the Javascript will submit the form, but it
can be returned and parsed via PHP.
Actually, would it be possible to just POST the data to a fsockopen() call
and read the response... eliminating the need for Javascript? There are a
slew of tools out there to do this (I have one such tool at
http://www.hansanderson.com/php/, LWP-ish tool).
I've done some scripts
like this, that post to a server and read the response, parse it and take
conditional steps (update databases, output errors, etc). The only hard
part is getting the parsing correct, as it can change frequently. If the
USPS is consistent, this won't take long, though.
Hans Anderson ~ me@hansanderson.com
PO Box 426, Missoula, MT 59806 | PHP, Search Engines, SQL
(800)397-9116 / (406)549-6524 | Databases, Flash Multimedia,
http://www.hansanderson.com | Killer Audio Production,
http://www.goofiness.com | Minty Fresh Breath.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com