<p>So I have this c# application that needs to ping my web server thats running linux/php stack.<br>
I am having problems with the c# way of base 64 encoding bytes.</p>

<p>my c# code is like:</p>

<pre><code>byte[] encbuff = System.Text.Encoding.UTF8.GetBytes("the string");
String enc = Convert.ToBase64String(encbuff);
</code></pre>

<p>and php side:</p>

<pre><code>$data = $_REQUEST['in'];
$raw = base64_decode($data);
</code></pre>

<p>with larger strings 100+ chars it fails.
I think this is due to c# adding '+'s in the encoding but not sure.
any clues</p>

Convert.ToBase64String doesn't seem to add anything extra as far as I can see. For instance:
```
```
byte[] bytes = new byte[1000];
Console.WriteLine(Convert.ToBase64String(bytes));
```
```
The above code prints out a load of AAAAs with == at the end, which is correct.
My guess is that
```
$data
```
on the PHP side doesn't contain what
```
enc
```
did on the C# side - check them against each other.