Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7860377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:15:43+00:00 2026-06-02T22:15:43+00:00

I am working with a company who has made a script to send over

  • 0

I am working with a company who has made a script to send over POST data to my PHP script (which is all setup and port forwarded properly etc).

The problem is, they say my script is not set up to handle POST requests.

This is their script:

Try

        strPost = strPost.Trim.Replace(" ", "%20")



        Dim objRequest As HttpWebRequest = WebRequest.Create(strPostURL)

        objRequest.Method = "POST"

        objRequest.ContentLength = strPost.Length

        objRequest.ContentType = "application/x-www-form-urlencoded"



        Try

            myWriter = New StreamWriter(objRequest.GetRequestStream())

            myWriter.Write(strPost)

        Catch eg As Exception



        Finally

            myWriter.Close()

        End Try



        Dim objResponse As HttpWebResponse = objRequest.GetResponse()

        Dim sr As StreamReader

        sr = New StreamReader(objResponse.GetResponseStream())

        success = sr.ReadToEnd()

        sr.Close()



        success = "Post Successful"



    Catch ex As Exception

        success = ex.ToString

    End Try

And here is mine:

<?PHP

$website = $_POST['web'] ;
$name = $_POST['name'] ;
$tel = $_POST['tel'] ;
$town = $_POST['town'] ;

foreach($_POST as $key => $thisOne){
$out .= $key . ': ' . $thisOne ;
}
if($out)
mail('test@test.com', 'Test', $out) ;
?>

I am unsure of what they mean by my script is not set up to handle POST data, as $_POST is the right thing to use no?


Thanks for your reply, that is what I thought, but he is adimant that my script is faulty.

This is the error he says he is getting:

.NET error


He is telling me he still gets that error and:

The code we use works with Sales Force, Sage and 7 other custom CRM integrations we have previously done.

🙁


Thanks, I found http://apikitchen.com/ allows me to properly test it and it’s coming back fine. Thanks for your help! Must be him like you say.


He is now telling me he is getting a new error!

enter image description here


He has just sent me the following, can anyone with .NET experience see anything wrong with the code?:

Try
strPost = "name=lf&town=london&country=uk&web=www.lf.com&tel=0123456789&keywords=sales&pages=5&multivisit=multihitdt=2012/04/30%2014:31referrer=google&landing=home"

        strPost = strPost.Trim.Replace(" ", "%20")



        Dim objRequest As HttpWebRequest = WebRequest.Create("http://mysite.dyndns-remote.com/myscript.php")

        objRequest.Method = "POST"

        objRequest.ContentLength = strPost.Length

        objRequest.ContentType = "application/x-www-form-urlencoded"



        Try

            myWriter = New StreamWriter(objRequest.GetRequestStream())

            myWriter.Write("name=lf&town=london&country=uk&web=www.lf.com&tel=0123456789&keywords=sales&pages=5&multivisit=multihitdt=2012/04/30%2014:31referrer=google&landing=home")

        Catch eg As Exception



        Finally

            myWriter.Close()

        End Try



        Dim objResponse As HttpWebResponse = objRequest.GetResponse()

        Dim sr As StreamReader

        sr = New StreamReader(objResponse.GetResponseStream())

        success = sr.ReadToEnd()

        sr.Close()



        success = "Post Successful"



    Catch ex As Exception

        success = ex.ToString

    End Try
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T22:15:46+00:00Added an answer on June 2, 2026 at 10:15 pm

    The URI he’s passing to the web request doesn’t seem to be valid (the Exception says it is empty). This is the strPostURL parameter in the last line of the stack trace image you’ve shown here.

    Tell him to use a proper URL when calling SalesForcePost.fncPost and everything should be fine.

    This is in no way your fault and doesn’t have anything to do with you not handling POST correctly. It is his fault. Tell him so, and if he doesn’t believe you, send him here to show us some code.

    EDIT
    As for the new error: Same thing here. He’s not passing a valid URI string. This may be because he’s passing something like “htt://sometest.com” oder “http:/sometest.com”. We can’t help you any further unless you post all code necessary to see how the fncPost method is called and most of the code of the fncPost method – at least the part where he creates the web request.

    The code you’ve posted is not his real code, otherwise he would not be getting the “URI scheme not valid” exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with a small company who is slowly moving to MS access.
I'm an emacs user who just started working for a new company where eclipse
Background I came from several years working in a company where all the database
I'm working on a project for my company that uses a socket server (php)
I am currently working on a project which has Employee, Manager entities. At the
Im working for a company who's website uses javascript to get facebook and twitter
I'm working at a SaaS company who releases new features and bug fixes to
The developer who created a platform my company uses is no longer working for
I recently got a job working for a company who uses several programming languages
An application our company is working on currently displays many rectangle shapes with gradients

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.