hello, i am a new comer.

is it possible to read data (e.g. some integers followed by a unique word) from a defined web page of a defined web site?

if possible please help me or suggest me which language is appropriate to do the job.........

Dani AI

Generated

A concrete, Java-centered workflow that addresses the original question and the parallel-port requirement:

Start by fetching and parsing the page with a robust HTML parser such as Jsoup (https://jsoup.org/). Extract the visible text or targeted elements, then locate the integer(s) next to the unique word with a simple regex. Example extraction (minimal):

Document doc = Jsoup.connect("http://example.com/page").get();
String text = doc.body().text();
Pattern p = Pattern.compile("\\b(\\d+)\\s+uniqueWord\\b", Pattern.CASE_INSENSITIVE);
Matcher m = p.matcher(text);
if (m.find()) {
    int value = Integer.parseInt(m.group(1));
    // forward value to hardware
}

If the data is injected by client-side JavaScript (so Jsoup sees only the initial HTML), use a headless browser like Selenium to render the page and read the DOM after scripts run: https://www.selenium.dev/.

For sending the extracted value to an external display, avoid relying on legacy parallel-port tricks unless the hardware and OS explicitly support it. A practical and portable approach is to use a microcontroller (Arduino, ESP32, etc.) connected over USB serial and send simple commands from Java. Use a library such as jSerialComm (https://fazecast.github.io/jSerialComm/):

SerialPort port = SerialPort.getCommPort("COM3"); // or /dev/ttyUSB0
port.setBaudRate(9600);
port.openPort();
port.getOutputStream().write((value + "\n").getBytes());
port.closePort();

Notes and troubleshooting: USB-parallel adapters usually do not expose individual LPT pin control. On Windows, direct LPT pin access requires kernel-level drivers; on Linux the parport interface exists but needs correct permissions. Test HTTP fetching separately (check status, user-agent, redirects) and test the serial link with a terminal before integrating. This builds on the earlier thread replies and gives a reproducible Java-first path for .

Recommended Answers

All 6 Replies

sure. If you know how to find the data in the html of the page, there's nothing preventing you from extracting that data (except maybe knowledge of the tools you elect to use to do it).

Any programming language that can handle blocks of text will do.
Depending on the details of how you plan to find the data you may be able to use more advanced tools like regular expressions to get you to your target more quickly, but there's certainly no requirement to use them.

First he has to make up mind which language he wants to use. As same post been made in C++ forum. So I guess he has no clue, just fishing what may be easier

:-(
is this a forum only for experts? doesn't my words express that i m confused?

to jwenting:
pattern matching codes can be used. but i don't know whether browser saves a page or not (when the page is opened and i haven't saved that yet).

the exact shape of my problem is, i have opened a page in a browser then i have to read a specific data and have to send that in the parallel port for an external display.

:-(
is this a forum only for experts?

No, not at all. You asked an incredibly general question and jwenting gave you a general answer. If you need specific answers you need to ask more specific questions.

browsers generally save whatever they download somewhere, at least temporarilly.
But that's irrelevant, as any program that needs to parse html and interpret the results will have to download that html itself.
It's easier that way, and you don't introduce dependencies on system specific settings (like installed browsers, where those browsers cache things, if they cache things at all, etc. etc.).

Originally Posted by shipar View Post

:-(
is this a forum only for experts?

sorry, jwenting i didn't write to u, but after 'peter_budo' 's comment.

jwenting & Ezzaral, thanks a lot for ur cordial welcome. thanks............

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.