API class to connect with web php
both methods, runScriptWithParameters and getScriptReturnWithParameters have a lot of code in common which should be extracted to a separate method.  
using string concatenation by using += will create each time a new string because strings are immutable. A better way would be to use a StringBuilder instead.  
based on the .NET naming guidelines methods should be named using PascalCase casing.  
the check for if (parameters.Count &gt; 0) is not needed, because if you get the enumerator and there are no items to enumerate over, the loops is just ending.  
you don't do any null validation on the methods parameters of your public methods. Omitting these will leak implementation details.  
you should use the var type whenever the type is obvious form the right hand of the assignment.  


Implementing some of the mentioned points will lead to  

private string ComposeUrlParameters(Dictionary&lt;string, string&gt; parameters)
{
    var builder = new StringBuilder(1024);
    var firstParameter = true;
    foreach (var parameter in parameters)
    {
        if (firstParameter)
        {
            builder.Append("?");
            firstParameter = false;
        }
        else
        {
            builder.Append("&amp;");
        }
        builder.AppendFormat("{0}={1}",parameter.Key, parameter.Value);
    }

    return builder.ToString();
}  


which then can be called like so  

public void RunScriptWithParameters(string url, Dictionary&lt;string, string&gt; parameters)
{
    if (url == null) { throw new ArgumentNullException("url"); }
    if (parameters == null) { throw new ArgumentNullException("parameters"); }  

    var urlToRun = url + ComposeUrlParameters(parameters);
    RunScript(urlToRun);
}


You could compose the url parameters with linq as well like so  

private string ComposeUrlParameters(Dictionary&lt;string, string&gt; parameters)
{
    if (parameters.Count == 0)
    {
        return string.Empty;
    }

    var builder = new StringBuilder(1024);
    var firstParameter = parameters.First();

    builder.AppendFormat("?{0}={1}",firstParameter.Key, firstParameter.Value);

    foreach (var parameter in parameters.Skip(1)
    {
        builder.AppendFormat("&amp;{0}={1}",parameter.Key, parameter.Value);
    }

    return builder.ToString();
}