-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
27 lines (24 loc) · 794 Bytes
/
Copy pathtest.php
File metadata and controls
27 lines (24 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
assert_options(ASSERT_ACTIVE, 1);
assert_options(ASSERT_WARNING, 0);
assert_options(ASSERT_QUIET_EVAL, 1);
assert_options(ASSERT_CALLBACK, function($file, $line, $code, $desc = null){
echo json_encode(func_get_args());
});
assert(false);
assert("2>1", "succ");
die;
$url = 'https://sandbox.itunes.apple.com/verifyReceipt';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_CAINFO, "dev.cer");
$res = curl_exec($ch);
print_r(curl_getinfo($ch));
if ($res === false) {
echo "errcode:" . curl_errno($ch) . "\n";
echo "errmsg:" . curl_error($ch) . "\n";
} else {
echo "succ:" . "\n";
}
curl_close($ch);