Uploading a file is not the issue. Making sure that the CGI/PHP script executes flawless is a bit more tricky, think about different versions of PHP and different PHP server configuration settings. Probably more to do with my inexperience than with anything else, but I have some php script in the pgn4web package that did have some problem running on different servers than the couple I tested with. Small stuff, but annoying enough to discourage people without much experience and really looking for something that just works.H.G.Muller wrote:I thought that things like CGI and PHP were absolutely standard in HTTP servers nowadays. It is clear that people who want to broadcast should have access to some server machine. It wouldn't be anymore difficult to upload a PHP or CGI file than to upload a PGN file.
How to post chess games
Re: How to post chess games
Re: How to post chess games
I found a different way using FTP.EXE as found in the Windows directory.
http://www.top-5000.nl/pgn4web/live.htm
Still under construction, but it seem to work.
I run:
script.txt
PS, page is currently refreshed every 5 seconds.
http://www.top-5000.nl/pgn4web/live.htm
Still under construction, but it seem to work.
I run:
Code: Select all
ftp -s:script.txt ftp.top-5000.nl
Code: Select all
top-5000.nl
password
cd pgn4web
put c:\arena\arena1.pgn
quit
Re: How to post chess games
Ed,
There is a small typo near the bottom of that page. You have "Odro" instead of "Ordo".
This will be great to follow the games.
Mark
There is a small typo near the bottom of that page. You have "Odro" instead of "Ordo".
This will be great to follow the games.
Mark
Re: How to post chess games
The only good bug is a dead bug.
-- DD
-- DD
Re: How to post chess games
Indeed.pgn4web wrote:Relying on a standard tool like FTP makes the whole thing easier to setup
It was an easy set-up after all.
Most of the time went into the things Arena was supposed to do, but didn't.
[Wish] - could you add EPD support as shown here on top of the board? People then can paste the current position into their favorite engine for analysis.
Re: How to post chess games
If you click on square B8 you get a popup where you can copy the FEN string of the current position or the PGN of the game starting from the current position. That is good enough for the cut&paste requirement.Rebel wrote:could you add EPD support as shown here on top of the board? People then can paste the current position into their favorite engine for analysis.
Not too difficult either to add the FEN string in an HTML element:
Add somewhere in your page this HTML:
Code: Select all
<div id="CurrentPositionFEN"></div>
Code: Select all
function customFunctionOnMove() {
var theObj = document.getElementById("CurrentPositionFEN");
if (theObj) { theObj.innerHTML = CurrentFEN(); }
}
Typing this without testing, so hopefully not too many typing errors...
-
- Posts: 190
- Joined: Sun Jul 14, 2013 10:00 am
- Real Name: H.G. Muller
Re: How to post chess games
Well, that is not my experience. From a Windows machine ftp often fails to work when I want to upload something to a Linux machine. It seems the newer Linux ftp servers can only work with clients that are in 'passive' mode. And the ftp that comes with Windows does seem to not support that command. So usually ftp just hangs without doing anything, even when I try something as simple as a DIR command.Rebel wrote:Indeed.pgn4web wrote:Relying on a standard tool like FTP makes the whole thing easier to setup
It was an easy set-up after all.
I prefer solutions that work 'out of the box', without relying on any external software that the user might or might not have, and that might or might not do what you want. Ftp would definitely be on my blacklist.
Re: How to post chess games
Thank you, works like a charm.pgn4web wrote:If you click on square B8 you get a popup where you can copy the FEN string of the current position or the PGN of the game starting from the current position. That is good enough for the cut&paste requirement.Rebel wrote:could you add EPD support as shown here on top of the board? People then can paste the current position into their favorite engine for analysis.
Not too difficult either to add the FEN string in an HTML element:
Add somewhere in your page this HTML:then add this javascript code:Code: Select all
<div id="CurrentPositionFEN"></div>
At every move the HTML element should be automatically updated to the FEN string of the current position.Code: Select all
function customFunctionOnMove() { var theObj = document.getElementById("CurrentPositionFEN"); if (theObj) { theObj.innerHTML = CurrentFEN(); } }
Typing this without testing, so hopefully not too many typing errors...
-
- Posts: 1242
- Joined: Thu Jun 10, 2010 2:13 am
- Real Name: Bob Hyatt (Robert M. Hyatt)
- Location: University of Alabama at Birmingham
- Contact:
Re: How to post chess games
H.G.Muller wrote:Well, that is not my experience. From a Windows machine ftp often fails to work when I want to upload something to a Linux machine. It seems the newer Linux ftp servers can only work with clients that are in 'passive' mode. And the ftp that comes with Windows does seem to not support that command. So usually ftp just hangs without doing anything, even when I try something as simple as a DIR command.Rebel wrote:Indeed.pgn4web wrote:Relying on a standard tool like FTP makes the whole thing easier to setup
It was an easy set-up after all.
I prefer solutions that work 'out of the box', without relying on any external software that the user might or might not have, and that might or might not do what you want. Ftp would definitely be on my blacklist.
Linux ftp servers don't have this problem. It is usually a firewall problem. In passive mode, ftp uses the same connection socket to send data and commands. And since the client end originates the connection, he can be behind a firewall, or a router that is using NAT, and all works well. But if you use non-passive mode, the server end has to open a connection to the client machine to actually send the data. And if the client is behind a firewall or a router that is doing NAT, this is impossible and the connection appears to hang. Since NAT uses fake port renumbering to work, it is impossible to open a connection to a client behind such a firewall/router unless you get really clever with port forwarding settings on the firewall/router.
passive mode solves all of this...
Re: How to post chess games
Paolo, maybe you can help me with the last glitch before I make the applet public. If you go to 1 of the 4 live channels then you will notice that often (usually with draws) the script refuses to go to the next game. I have PGN4WEB initialized as follows:
Is there a way to fix it?
Code: Select all
<script type="text/javascript">
SetPgnUrl("http://rebel13.nl/pgn4web/arena1.pgn");
SetImagePath ("alpha/36");
SetImageType("png");
SetGameSelectorOptions("Select a game...", false, 8, 8, 0, 8, 8, 8, 10); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate);
SetCommentsOnSeparateLines(false);
// SetAutoplayDelay(500); // milliseconds
SetAutostartAutoplay(true);
SetAutoplayNextGame(true);
SetInitialGame("last");
SetShortcutKeysEnabled(false);
SetInitialHalfmove("end", true),
SetLiveBroadcast(0.01, false, false, false, false);
</script>