Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nc -l -p 12345
- $ch = curl_init('http://127.0.0.1:12345');
- curl_setopt_array($ch, [
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_POST => true,
- CURLOPT_POSTFIELDS => ['foo' => 1],
- ]);
- $response = curl_exec($ch);
- melkij@melkij:~$ nc -l -p 12345
- POST / HTTP/1.1
- Host: 127.0.0.1:12345
- Accept: */*
- Content-Length: 139
- Expect: 100-continue
- Content-Type: multipart/form-data; boundary=------------------------05be5d432625f809
- --------------------------05be5d432625f809
- Content-Disposition: form-data; name="foo"
- 1
- --------------------------05be5d432625f809--
Add Comment
Please, Sign In to add comment