Jump to content

Passing get variables through https:// ssl secured url


andy1212

Recommended Posts

Hey, I'm trying to pass get variables through an https ssl secured url to generate xml data so I can parse it and I'm not sure how to get it working. I have the following code,

 

I have the url set up like this,

$xml = '
weight_system="IMPERIAL" shipper_number="000222000" destination_postal_code="'.$data5['zip'].'" service_type="1"
';


$xml2 = '
total_pieces="'.$value.'" total_weight="'.$weight.'"
';


$token = 'token';
$base_url = 'https://www.shippingco.com/XML/RatingXML.jsp';


$request_url = $base_url . '?' . http_build_query(array(
'shipment' => '<shipment ' . $xml . '><total ' . $xml2 . '/></shipment>',
'token' => $token
));

and I have an example of the xml data here,

<rating xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.shippingco.com/XML/rating.xsd">
<rate weight="5.0" weight_unit="lb" zone="3" transit_time="1" transit_time_guaranteed="false" estimated_delivery_date="2013-07-26" base_charge="11.05" freight_charge="11.05"residential_address_charge="2.75" net_charge="13.80" fuel_surcharge_rate="15.8" fuel_surcharge="1.75" subtotal_charge="15.55" on_hst_charge="2.02" total_charge="17.57"/>
</rating>

I have an RSA key, SSL cert, CA bundle and a password and need to use that information to authenticate with the https url. What is the best working way to accomplish this?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.