Skip to content

Instantly share code, notes, and snippets.

View janewang's full-sized avatar

Jane Wang janewang

  • Washington, DC
View GitHub Profile
if($shipp == 'International (excl. Canada)') {
$shipmethod = 'UPSIS';
}
else if($shipp == 'Canada') {
$shipmethod = 'UPSIS';
}
else if ($shipp == 'Alaska and Hawaii') {
$shipmethod = 'UPS3';
}
started
[Fri Nov 21 03:34:01 2014] [notice] Digest: generating secret for digest authentication ...
[Fri Nov 21 03:34:01 2014] [notice] Digest: done
[Fri Nov 21 03:34:01 2014] [notice] Apache/2.2.25 (Unix) DAV/2 mod_ssl/2.2.25 OpenSSL/1.0.0-fips configured -- resuming normal operations
[Fri Nov 21 03:36:53 2014] [error] [client 127.0.0.1] client denied by server configuration: /var/www/html/blog
--
ended
[Sat Nov 22 03:37:03 2014] [error] [client 127.0.0.1] client denied by server configuration: /var/www/html/xmlrpc.php, referer: http://www.swellbottle.com/
[Sat Nov 22 03:37:03 2014] [error] [client 127.0.0.1] client denied by server configuration: /var/www/html/xmlrpc.php, referer: http://www.swellbottle.com/
HTTP/1.1 200 OK
Date: Thu, 20 Nov 2014 23:15:37 GMT
Server: Apache
Content-Length: 4170
Connection: close
Content-Type: text/xml; charset=ISO-8859-1
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="http://www.w3.org/2001/XMLSchema"xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header/><soap:Body><PLGetOrderStatusResponse xmlns="http://prolog3pl.com/"><PLGetOrderStatusResult><Orders><PLOrderStatusHeader><ProLogOrderId>7837356</ProLogOrderId><OrderNumber>AWSWP0005</OrderNumber><Status>ENTERED</Status><CompletedDate>40-01-01T00:00:00.00</CompletedDate><ShippingService>TBA</ShippingService><LastUpdatedDate>2014-11-20T14:57:00.00</LastUpdatedDate><Lines><PLOrderStatusLine><ProLogLineId>1</ProLogLineId><LineNumber>1</LineNumber><Product>FWB-GRP</Product><QuantityOrdered>1</QuantityOrdered><QuantityShipped>1</QuantityShipped><QuantityBackordered>0</QuantityBackordered></PLOrderStatusLine><PLOrderStatusLine><ProLogLineId>2</ProLogLineI
[root@ip-10-0-100-244 plugins]# php -f PLGetOrderStatusNew.php
HTTP/1.1 200 OK
Date: Thu, 20 Nov 2014 22:41:32 GMT
Server: Apache
Content-Length: 0
Connection: close
Content-Type: text/xml; charset=ISO-8859-1
/*
$fedex = array('FedEx: Priority Overnight' => 'FEDEX1P',
'FedEx: 2-Day' => 'FEDEX2',
'FedEx: Standard Overnight' => 'FEDEX1S',
'FedEx: Express Saver' => 'FEDEX3',
'FedEx: Home Delivery' => 'FEDEXGH',
'FedEx: Ground [Canada]' =>'FEDEXGC',
'FedEx: Ground' => 'FEDEXG',
'FedEx: International Priority' => 'FEDEXINTLP',
'FedEx: International Economy'=> 'FEDEXINTLE',
$shipp = str_replace(' ','',$data['shipping_option']);
if($shipp == 'InternationalRate'){
$shipmethod = 'USPSINTLFC';
} else if($shipp == 'InternationalPriority'){
$shipmethod = 'USPSINTLFC';
} else if($shipp == 'InternationalEconomy'){
@janewang
janewang / gist:3d5a518e9f138ec8f4f4
Created November 4, 2014 20:25
Splitting by whitespace
11 function getBody ($httpResponse) {
$lines = preg_split('/(\r\n|\r|\n)/', $httpResponse);
...
}
On 10.0.100.135, php.ini includes, note all commented out
;extension=mcrypt.so
;zend_extension = /usr/lib/php5/20121212/ioncube_loader_lin_5.3.so
;extension=curl.so
;extension=pdo.so
;extension=pdo_sqlite.so
;extension=sqlite.so
;extension=pdo_mysql.so
[curl]
; A default value for the CURLOPT_CAINFO option. This is required to be an
; absolute path.
;curl.cainfo =
; Local Variables:
; tab-width: 4
; End:
extension=mcrypt.so
/usr/bin/which: no try in (/usr/lib64/qt-3.3/bin:/opt/ant/bin:/usr/lib/hadoop/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/java/latest/bin:/opt/jruby/bin:/home/jwang/development/BigData/script:/home/jwang/development/DevTools:/sbin:/usr/sbin:/home/jwang/development/BigData/lib/hadoop/bin:/opt/vertica/bin:/usr/etsy/bin:/search/dist/bin)