This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [...new Array(10).keys()] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $xml='<?xml version="1.0" encoding="UTF-8"?><qm:response xmlns:qm="http://tour.ectrip.com/2014/QMResponseSchema" xsi:schemaLocation="http://tour.ectrip.com/2014/QMResponseSchema QMRequestDataSchema-1.1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><qm:header><qm:application>tour.ectrip.com</qm:application><qm:processor>DataExchangeProcessor</qm:processor><qm:version>v2.0.0</qm:version><qm:bodyType>CreateOrderPaymentRequestBody</qm:bodyType><qm:createUser>xxx</qm:createUser><qm:createTime>2019-06-05 15:31:32</qm:createTime><qm:code>1000</qm:code><qm:describe>SUCCESS</qm:describe></qm:header><qm:body xsi:type="qm:CreatePaymentOrderResponseBody"><qm:orderInfo><qm:partnerorderId>20190605999777004</qm:partnerorderId><qm:orderStatus>PREPAY_ORDER_PRINT_SUCCESS</qm:orderStatus><qm:qrCodeStr>CYT_837f99</qm:qrCodeStr><qm:qrCodeUrl>http://dy.jingqu.cn/z/2xxx6.do</qm:qrCodeUrl><qm:verifyCode>19831207</qm:verifyCode></qm:orderInfo></qm:body></qm:response>'; | |
| $p = xml_parser_create(); | |
| xml_parse_into_str |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function generateRandomString($length = 10) { | |
| $characters = '0123456789abcdefghijklmnopqrstuvwxyz'; | |
| $charactersLength = strlen($characters); | |
| $randomString = ''; | |
| for ($i = 0; $i < $length; $i++) { | |
| $randomString .= $characters[rand(0, $charactersLength - 1)]; | |
| } | |
| return $randomString; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var getUrlParameter = function getUrlParameter(sParam) { | |
| var sPageURL = decodeURIComponent(window.location.search.substring(1)), | |
| sURLVariables = sPageURL.split('&'), | |
| sParameterName, | |
| i; | |
| for (i = 0; i < sURLVariables.length; i++) { | |
| sParameterName = sURLVariables[i].split('='); | |
| if (sParameterName[0] === sParam) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function postRequest($postdata,$url) | |
| { | |
| $postdata = http_build_query($postdata); | |
| $opts = array('http' => | |
| array( | |
| 'method' => 'POST', | |
| 'header' => 'Content-type: application/x-www-form-urlencoded', | |
| 'content' => $postdata | |
| ) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ cat /etc/debian_version | |
| 7.6 | |
| $ sudo apt-get update | |
| $ sudo apt-get upgrade | |
| # install dependencies | |
| $ sudo apt-get install libssl-dev libavahi-client-dev libasound2-dev | |
| # clone source |