LanWall – Free PHP Comment Wall for LAN users! Opensource!

Live Demo Here!

Screenshots:


LanWall is a PHP-based project for creating community among users connected in a Local Area Network (LAN). Users can post messages in the wall and make replies.

In administrative mode, admin can modify comments & posts, ban certain IPs, restrict access or reset anything.

Pros:

  • Requires no database! You do not need any database server. Unzip and use!

Cons:

  • Requires a web server, i.e Apache/Xampp. Requires PHP
  • Not coded in Object-oriented fashion, kinda hard to edit codes 😦

The product is released as opensource and can be redistributed or modified keeping the file license.php intact.

OpenSource Project released by
PROGmaatic Developer Network

For bug reports feel free to mail the author


Download Links

Current Version: 1.0 beta:  Download from SourceForge.net

PHP Fatal error: Cannot access empty property in

Are you trying to access any object’s property (variables/functions) using: $this->$property ?

Check out the red $ should not appear before object properties. In contrast:

<?php
	class A{
		$b = "some value";

		public function get_b(){
			return $this->$b;	// WRONG !!!
		}
	}

	// Using the class

	$myObject = new A();
	echo $myObject-$get_b();	// WRONG!!!
?>

the above code segment is wrong. You should use $ only once – before ‘ this’ only. No need to use $ sign before class variables or methods.

Correct version of the above code segment:

<?php
	class A{
		$b = "some value";

		public function get_b(){
			return $this->b;
		}
	}

	// Using the class

	$myObject = new A();
	echo $myObject-get_b();
?>

Bangla/Bengali Web File Manager by PHP বাংলা ফাইল ম্যানেজার

Hello, everybody! Today I’m going to share one of my little but proud contributions to the Bengali language – A Complete Bangla File Manager written in PHP. No, I didn’t write the core file manager script, as there are plenty of scripts available written by professional coders. So I chose File Thingie, a singe-file open source PHP based file manager script. The next thing I did, translated it to my mother lagnguage Bengali 🙂

Check out the screenshots:

So what you need to do?

  1. Download latest copy of File Thingie from here (recommended 2.5.3)
  2. Download Bangla Translation extension from here. Rename it to “ft_lang_bn.php” & put it in the same folder where your downloaded copy of File Thingie resides.
  3. Edit the file thingie script, select Bangla as the default language. All you need to do, is simply edit the File Thingie script, find the line containing $ft[“settings”][“LANG”] and set it to bn:

$ft[“settings”][“LANG”]              = “bn”;

Now it should be working properly, as working properly in my servers:

Anyway, I think your tasks are simplified, since translating is not that kind of job for a programmer 😦 Anyway, some of my translations are spelled incorrectly, some of them might not be suitable. Please let me know about them. And you’re always at your freedom to modify the code as you need!

Note: My translation also stays in the translation packages-download page of File thingie. But i recommend to download it from the hostcode-site, as i may update the script later.

So fire up your bangla file manager now!!!

Free PHP FTP Uploader Script

As many of you already know, & rest will be known by the end of the post that you can make FTP connections and actions by PHP, we can create a simple one-page FTP based File Uploader running in PHP 🙂

Well, are you wondering, what’s the need of this heck when we can already upload files by simple PHP calls? Well, many of us run our files on Free Hosting Providers, and they dont allow us to write files. They simply restrict opening files in Write mode, so though we can read the file from a remote location, we can’t write it safely in our server 😦

So if we want to copy some files from another server to our server, & if you’re allowed to make FTP connections (that means you have an FTP username & password) we can use the script below. This is a one file PHP script, Put it in the directory where you want to upload files, and use it with simple efforts.

The Script

Yes, it’s free 🙂 Grab it from here

The code is pretty self-explanatory, so if you’re going to modify it, you’ll find it a piece of cake!

Screenshot

Really simple huh?

Issues

  • If FTP is not enabled in your server configuration, this will not work. Check your PHP configuration by phpinfo();
  • If your server configuration restricts remote opening file (reading files hosted in other server) , this will not work.

How to automatically update Twitter status by PHP

I was wondering how to update my status automatically in twitter using PHP, & found some interesting articles on the internet. I found One all-in-one open-source php project which needed CURL support, but many servers can restrict that access to curl. So with a little help from here & the official Twitter API, I’ve just prepared a working script to Update your Status at twitter automatically 🙂 The best thing is, you don’t need to have CURL enabled! (it will then use fsockopen if CURL is disabled)

Download Code

http://hostcode.sourceforge.net/view/53

How to Use

Once downloaded, save the code in a file like twitter.php

Then use following simple function to automatically update your status:

require_once("twitter.php");
$username = "YOUR-TWITTER-USERNAME";
$password = "YOUR-TWITTER-PASSWORD";
$status = "My First status from the API!";
// encode the status
$status = urlencode($status);
// Tweet it!
$twitter = tweet($username,$password,$status);
// Now you can do additional fun with the data returned at $twitter variable. That's not necessary after all

Troubles? Let me know…… Got help? Cheer me up!

Create HTML by PHP – Easy and Quick Free HTML Generator!

To generate HTML Pages by PHP, we need to echo certain HTML tags, like <head>,<html>, external javascripts, css, <meta> tags blah blah blah…. it’s boring to print these tags each time you create a HTML page just to display a short message or short body. So I’ve created a template called html.php, you can include this source in your php page and call html_head() to generate the basic HTML tags!

Download Links

Latest Version Old Version | Mirror link

Why use it?

Wondering why use this generator? Just include the html.php in your source by calling

require_once('html.php');

Then call

html_head();

Bingo! the function html_head automatically generate following HTML tags for you!

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<html>
		<head>
			<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<LINK REL="SHORTCUT ICON" HREF="http://i46.tinypic.com/111up8o.jpg">
			<meta name="description" content="Generated HTML by PHP" />
			<meta name="keywords" content="Generated HTML by PHP" />
			<title>Generated HTML</title>
                <style type="text/css">body{font-family:Arial, Helvetica, sans-serif; font-size:10px; color:#333;}</style>

Cool! Of course, you can pass optional parameters in html_head() and customize the generated HTML.

Documentations

Pass optional parameters in html_head() function. The function has a definition like:

html_head($title = "Generated HTML", $css_array = "", $js_array = "", $start_body=false)

Explanation:

$title: Document Title

$css_array: Array of External CSS files (.css) to be included

$js_array: Array of External javascript files (.js) to be included

$start_body: If passed as true, it will print </head><body>, otherwise not.

You see, all parameters are optional. For Example, if you need to include myjs.js you can call html_head like this:

html_head("My New HTML File", "", array('myjs.js'));

Other Functions:

html_foot: prints </body></head>

html_error: Prints an Error/OK message. See source for more details.