[fpc-pascal] Ethernet Relays

Michael Van Canneyt michael at freepascal.org
Mon May 25 10:47:13 CEST 2020



On Sun, 24 May 2020, James Richters wrote:

> I got this working, thanks for the advice Ched, 
>
> Here's my test program:
> uses  fphttpclient;
> Begin
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/01');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/03');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/05');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/07');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/43');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/09');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/11');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/13');
> TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/15');
> End.
>
> I have to give it a command to go the next page for some reason or relays
> 5-8 won't work...  so now I'm wondering if there is a way I can retrieve
> the data that is normally displayed in my browser to I can see what page
> number I'm on,  I could also then check the status of the relays as well
> by analyzing what I read.

Simpleget is a function that returns the page:

S:=TFPHTTPCLIENT.SIMPLEGET('http://10.10.01.01/30000/15');

S will contain the page of HTML.

If you need to send a command, you'll probably need to use SimplePost()

Michael.


More information about the fpc-pascal mailing list