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 8072871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:09:50+00:00 2026-06-05T14:09:50+00:00

Basically i have these two pages… each with a string that i get with

  • 0

Basically i have these two pages… each with a string that i get with a minecraft bukkit plugin. I need to know if its possible that i can change the String in the index.php file which sits on a web server using java methods. Basically I’m too lazy to edit the files every time i release a update to my plugin. To get more info on what I’m talking about…. http://updates.milkycraft.net/ – for the version. The source code of my plugin can be found at http://github.com/milkywayz/entitymanager/. I would probably just want to create a separate java application with swing and have that update the values. The index.php file for both strings are extremely simple, i just declared a string variable then echo’d it.

  • 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-05T14:09:51+00:00Added an answer on June 5, 2026 at 2:09 pm

    Of course you could change the PHP file, but it’s not the best solution – it would be really error-prone. There is an other alternative: write the data to the separate file in a well-known format (XML, JSON, YAML, INI etc.) and let the PHP script read it.

    Map<String, String> data = new HashMap<String, String>();
    data.put("a", "value a");
    data.put("b", "value b");
    data.put("c", "value c");
    
    // Convert a Map to JSON using GSON:
    String data = new Gson().toJson(data);
    
    // Write data to the file:
    BufferedWriter writer = null;
    
    try {
        writer = new BufferedWriter(new FileWriter("/path/to/file"));
        writer.write(data);
        writer.flush();
    } catch ( ... ) {
       ...
    } finally {
        if (writer != null) {
            writer.close();
        }
    }
    
    // Read the data
    $data = json_decode(file_get_contents('/path/to/file'));
    
    print_r($data);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have over two hundred web pages that need a lightbox added to them.
We have two separate web-apps, say 'retailUI' and 'bulkUI'. These two are basically two
I have some localization problems in my webpage. There are basically two problems (that
All, I basically have two identical pages from a coding perspective. The first page
I have two modules that should over ride other urls, basically /management/category/edit/id/1 (Edit Category
I have two web pages which work basically the same, code-wise, but one of
I have two pages (basically two div tags; only one is shown at a
I have those two html radio buttons and textarea. I basically want to enable
Basically I have two 2D points and there is a line between them. A
So! Basically I have a database with a load of blog posts, these are

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.