Blog visitors can change line on LCD...


New member
hey, can you please send me the script you are using on your site for the LCD? it's really cool and i would love to implement it on my site. As always, i give credit where credit is due.


New member
Okay, here goes...

I'm using JaLCDs for its ability to retrieve external data sources, which I should recommend as a feature to CrystalControl since I would much rather use it than JaLCDs.

The first thing you need to do is create a text file on your webserver that the script can write to, so chmod it to 755 or 777. The PHP script I will give below writes to this file, so you can leave it blank if you want. Mine currently shows:

setvar lcdblog This kicks ass!! Please share the code!;
Once you have done this, open up JaLCDs and click on the "external variables" button and add the URL to your text file like such:

<img src="">

Now integrate the variable into your screen settings however you want. I used the variable name 'lcdblog':

<img src="">

Okay, to the PHP. The PHP code goes above the form.

*NOTE: I put two periods in front of items that were parsed by the board. Should be removed prior to implementation.

if($_POST['lcdchange']) {
$prestuff = "setvar lcdblog ";
$poststuff = ";";
$userstuff = $_POST['sayit'];
$all = $prestuff . $userstuff . $poststuff;
$getgo = fopen("/path/to/yourfile.txt", "w+");
$all2 = stripslashes($all);
$doit = fwrite($getgo, $all2);
$handle = fopen("/path/to/yourfile.txt", "r");
while (!feof($handle)) {
$buffer = fgets($handle, 4096);

$echostuff = substr($buffer, 15, -1);
echo stripslashes($echostuff);
if($doit) {
echo "<>(success)<>";
/* Optional Logging to MySQL
@mysql_connect("localhost", "username", "password");
@mysql_select_db("database name");
$query = "INSERT INTO bloglcd (message, ip) VALUES ('" . $userstuff . "','" . $_SERVER["REMOTE_ADDR"] . "');";
$dbit = @mysql_query($query);

Then the form (remove the ..):

<..form action="<..?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
< valign="top">
<..input name="sayit" size="8" type="text">
<..input type="hidden" name="lcdchange" value="1">
<..input value="Do it." type="submit">
And finally if you want to log the messages and IPs to MySQL, this is the two column table I made in 5 seconds:

CREATE TABLE bloglcd (
id int(8) NOT NULL auto_increment,
message varchar(255) NOT NULL default '',
ip varchar(30) NOT NULL default '',


So there it is. Respond with any problems/questions.
Last edited: