3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $host = "c3-test.wirecard.com"; $port = 443; $path = "/secure/ssl-gateway"; $login = "56500"; $pass = "TestXAPTER"; $errno = "401"; $errstr = "auther"; $poststring = "<?xml version='1.0' encoding='UTF-8'?> <WIRECARD_BXML xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xsi:noNamespaceSchemaLocation='wirecard.xsd'> <W_REQUEST> <W_JOB> <JobID>job 2</JobID> <BusinessCaseSignature>56500</BusinessCaseSignature> <FNC_CC_TRANSACTION> <FunctionID>WireCard Test</FunctionID> <CC_TRANSACTION mode='demo'> <TransactionID>2</TransactionID> <Amount>10</Amount> <Currency>USD</Currency> <CountryCode>US</CountryCode> <RECURRING_TRANSACTION> <Type>Single</Type> </RECURRING_TRANSACTION> <CREDIT_CARD_DATA> <CreditCardNumber>4200000000000000</CreditCardNumber> <CVC2>000</CVC2> <ExpirationYear>2016</ExpirationYear> <ExpirationMonth>01</ExpirationMonth> <CardHolderName>Wirecard Test</CardHolderName> </CREDIT_CARD_DATA> <CONTACT_DATA> <IPAddress>67.29.138.2</IPAddress> </CONTACT_DATA> <CORPTRUSTCENTER_DATA> <ADDRESS> <Address1></Address1> <City></City> <ZipCode></ZipCode> <State></State> <Country></Country> <Phone></Phone> <Email>support@wirecard.com</Email> </ADDRESS> </CORPTRUSTCENTER_DATA> </CC_TRANSACTION> </FNC_CC_TRANSACTION> </W_JOB> </W_REQUEST> </WIRECARD_BXML>"; $fp = fsockopen("https://".$host, $port, $errno, $errstr, 5); if(!$fp){ //error; tell us echo "Error: $errstr ($errno)\n"; }else{ //send the server request fputs($fp, "POST $path HTTP/1.0\r\n"); fputs($fp, "Host: $host\r\n"); fputs($fp,"Content-type: text/xml\r\n"); fputs($fp, "Content-length: ".strlen($poststring)."\r\n"); fputs($fp, "Authorization: Basic ".base64_encode($login.":".$pass."\r\n")); fputs($fp, "Connection: close\r\n"); fputs($fp,"\r\n"); fputs($fp, $poststring . "\r\n\r\n"); // prepare for reading the response stream_set_timeout($fp,30); // here we save the response body - XML response from WireCard $output = ""; // here we store the HTTP headers $headers= ""; // temp. variable for detecting the end of HTTP headers. $is_header = 1; while(!feof($fp)) { $buffer = fgets($fp, 128); // fgets on SSL socket if ($buffer == FALSE) { break; } if (!$is_header) { $output .= $buffer; } if ($buffer == "\r\n") { $is_header = 0; } if ($is_header) { $headers .= $buffer; } } //close fp - we are done with it fclose($fp); // print the results in Web Browser - and convert all special // characters (like <,>,...) to HTML entities echo "<PRE>\n"; echo htmlentities($headers); echo "\n"; echo htmlentities($output); echo "</PRE>\n"; } ?>
based on v17sn
Output for 5.3.17 - 5.4.6, 5.4.14 - 5.5.35, 7.0.4, 7.1.5 - 7.1.6, 7.2.0
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (0)
Output for 7.1.10
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32512)
Output for 7.1.7
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32690)
Output for 7.1.0
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32683)
Output for 7.0.3, 7.0.20
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32519)
Output for 7.0.2, 7.0.6
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (1)
Output for 7.0.5
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32573)
Output for 7.0.1
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32555)
Output for 7.0.0
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32722)
Output for 5.6.28
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32760)
Output for 5.6.21
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32570)
Output for 5.6.20
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32574)
Output for 5.6.19
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32613)
Output for 5.6.18
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32616)
Output for 5.6.17
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32641)
Output for 5.6.16
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32609)
Output for 5.6.15
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32521)
Output for 5.6.14
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32568)
Output for 5.6.13
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32697)
Output for 5.6.12
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32550)
Output for 5.6.11
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32516)
Output for 5.6.10
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32509)
Output for 5.6.9
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32538)
Output for 5.6.8
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32699)
Output for 5.4.12, 5.6.7
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32695)
Output for 5.4.13
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32561)
Output for 5.4.11
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32658)
Output for 5.4.10
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32542)
Output for 5.4.9
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32602)
Output for 5.4.8
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32624)
Output for 5.4.7
Warning: fsockopen(): unable to connect to https://c3-test.wirecard.com:443 (Unable to find the socket transport "https" - did you forget to enable it when you configured PHP?) in /in/kQltN on line 114 Error: Unable to find the socket transport "https" - did you forget to enable it when you configured PHP? (32721)