PHP script to do a post opperation
[email protected] ("Patrick Calkins")
| Newsgroups | php.lang |
|---|---|
| Message-ID | <[email protected]> |
Hello all! Here is an interesting problem that I can not solve, maybe one of you know?? Here is what I'm trying to do. I sell a lot of items on eBay, and lots of people ask me for a quote on shipping. We ship via UPS and I go to their site a lot to lookup rates. I decided to make my own web page that links into UPS' with most of the fields already pre-set, and all I want to do is give the user back a total for shipping. I need to manipulate what comes back from UPS first, so I can add to the shipping price to cover materials, etc, then give the final numbers back to the end user. This is where I have a problem. I was able to have my page act as a user-agent, and do the submit itself, however on UPS's site, their submit button is not a button, but rather an image. Since a button is easy to know what values are getting set (ie name="Submit" value="getinfo"), I did not know what vars the image-submit was setting, since there was no 'value' variable, only a 'name' variable. I tried it on my own server and found that php assigns the values 'name_x' and 'name_y' giving us the x&y values of where the user clicked, but UPS does not use PHP, so I don't know what their software sets the submit values to hence it does not work correctly. Their form just thinks something went wrong and displays the beginning again. If I just include their submit button on my form, then all works fine, except for the fact that I can't intercept the data comming back from UPS so that I can adjust the prices. Any idea on how to do this??? Thanks and sorry if this seems long-winded...