Skip to content

Instantly share code, notes, and snippets.

Paul paulvonlecter

Block or report user

Report or block paulvonlecter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulvonlecter
paulvonlecter / get-post-functions.cs
Created Mar 30, 2017
GET & POST requests' functions in C#
View get-post-functions.cs
private static string POST(string Url, string Data) {
System.Net.WebRequest req = System.Net.WebRequest.Create(Url);
req.Method = "POST";
req.Timeout = 100000;
req.ContentType = "application/x-www-form-urlencoded";
// Кодировка указывается в зависимости от кодировки клиента
byte[] sentData = Encoding.GetEncoding(1251).GetBytes(Data);
req.ContentLength = sentData.Length;
System.IO.Stream sendStream = req.GetRequestStream();
sendStream.Write(sentData, 0, sentData.Length);
@paulvonlecter
paulvonlecter / bitmask.php
Created Nov 7, 2017
Stupid case to process bitmask on PHP
View bitmask.php
<?php
// source data
$source = array(
false,
true,
true,
false,
true,
true,
false,
You can’t perform that action at this time.