This is a discussion on fsockopen within the PHP Language forums, part of the PHP Programming Forums category; I am having a problem with fsockopen... I have narrowed it down to the fact that the URL I am ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am having a problem with fsockopen... I have narrowed it down to the
fact that the URL I am requesting is too long when attempting in this fashion. What are the limitations to this, is there a way around it? I have also tried posting using cURL and various other options but have hit a wall where nothing seems to work. I need to post XML to an API along with several variables outside of that. For example: testing.shippingapis.com/ShippingAPI.dll?API=CustomsCN22Certify&XML=<Custom sCN22CertifyRequest USERID="XXXX" PASSWORD="XXX"><Option></Option><FromFirstName>From First</FromFirstName><FromLastName>From Last</FromLastName> <FromFirm>From Firm</FromFirm><FromAddress1>From Address 1</FromAddress1><FromAddress2>6406 Ivy Lane</FromAddress2><FromCity>Greenbelt</FromCity><FromState>MD</FromState><FromZip5>20770</FromZip5><FromZip4>1234</FromZip4><FromPhone>3019187658</FromPhone><ToAddress1>To Address 1</ToAddress1><ToAddress2>To Address 2</ToAddress2><ToAddress3>To Address 3</ToAddress3><ToAddress4>To Address 4</ToAddress4><ToAddress5>To Address 5</ToAddress5><ToAddress6>To Address 6</ToAddress6><ToCountry>France</ToCountry><ToAPOFPOZip5></ToAPOFPOZip5><ToPhone>110984532054</ToPhone><ToFax>110984301292</ToFax><ToEmail>ToEmail@Company.com</ToEmail><ShippingContents> <ItemDetail><Description>Description 1</Description><Quantity>1</Quantity><Value>1</Value><NetPounds>5</NetPounds><NetOunces>0</NetOunces></ItemDetail></ShippingContents><GrossPounds>7</GrossPounds><GrossOunces>2</GrossOunces><ImageType>GIF</ImageType><ContentType>Gift</ContentType> <HSTariffNumber></HSTariffNumber><CountryOfOrigin></CountryOfOrigin></CustomsCN22Request> |
|
|||
|
theouimets@hotmail.com wrote:
> I need to post XML to an API along with several variables outside of > that. For example: > See the reply to the question of theouimets@hotmail.com "fopen question", I have posted earlier today in this group. JW |