title: i can open php file in browser but android says file not found
body: <p>I am new to programming so I apologize in advance if this is a silly mistake. I have a PHP file named "info.php" on a server that I can open in my browser with no problems by navigating to: 138.68.176.180/info.php. But when I try to send data to this file from android app it gives me this error:</p>
  
  <p>java.io.FileNotFoundException: <a href="http://138.68.176.180/info.php" rel="nofollow noreferrer">http://138.68.176.180/info.php</a></p>
  
  <p>my code is:</p>
  
  <pre><code>    @Override
      protected String doInBackground(String... params) {
          URL url;
          String urlParams = params[0];
          String targetURL="http://138.68.176.180/info.php";
  
          HttpURLConnection connection = null;
          try {
              //Create connection
              url = new URL(targetURL);
              connection = (HttpURLConnection) url.openConnection();
              connection.setRequestMethod("POST");
              connection.setRequestProperty("Content-Type",
                      "application/x-www-form-urlencoded");
  
              connection.setRequestProperty("Content-Length", "" +
                      Integer.toString(urlParams.getBytes().length));
              connection.setRequestProperty("Content-Language", "en-US");
  
              connection.setUseCaches(false);
              connection.setDoInput(true);
              connection.setDoOutput(true);
  
              //Send request
              DataOutputStream wr = new DataOutputStream(
                      connection.getOutputStream());
              wr.writeBytes(urlParams);
              wr.flush();
              wr.close();
  
              //Get Response
              InputStream is = connection.getInputStream();
              BufferedReader rd = new BufferedReader(new InputStreamReader(is));
              String line;
              StringBuffer response = new StringBuffer();
              while ((line = rd.readLine()) != null) {
                  response.append(line);
                  response.append('\r');
              }
              rd.close();
              connection.disconnect();
              return response.toString();
  
          } catch (Exception e) {
  
              e.printStackTrace();
              return null;
  
          } finally {
  
              if (connection != null) {
                  connection.disconnect();
              }
          }
      }
  </code></pre>
  
  <p>what am I doing wrong on the server side? or on the code side?</p>
  
  <p>Thanks!</p>