Mailing List

Enter your Email


Powered by FeedBlitz

RSS Feed

Entrecard

Links

Blogshares Links

Beginner's Guide to BlogShares
A guide about the BlogShares fantasy blog stock market.
Scared Bunny
BlogShares Price Tracker
This program that archives information about the BlogShares fantasy stock market. You can view graphs of any industry, and analyze your portfolio.

SproutWorks Projects

Digg Archive
A new experimental Digg page.
AJAX Pixel Editor
A Collaborative pixel editor currently in development.
Web promotion links
These tools help you get visitors on your website.
SproutPics
My photography Site
SproutZoo
My zoo photographs
Tag Cloud
A summary of tagged articles.
Found Photos
An automated page that thumbnails photos from another site.
SproutSearch
I designed this blog indexing tool, and it has accumulated over 6 million blogs so far.
Products
Some of the programs I've written.
RSS Feeds
RSS Feeds from the SproutWorks Forums
SproutTree Demo
A demo of a tree-drawing PHP script.
My Gallery

SproutWorks Chat
A chat room I programmed, most likely empty.
Link Exchange - Link Directory - Web Hosting

Sign In

Username:
Password:
Remember Me

sprout man
Posts tagged php

sproutworks
I have written a new PHP script that counts the lines of code in a project. Currently, it does not recognize commented blocks, so all lines in a file are counted.

The code base for Sproutworks CMS is 21,692 lines. I don't know how this compares to other PHP CMSs, I'll have to research this.

http://sproutworks.com/codecounter.php


sproutworks
Forums/SproutWorks
March 9th, 2005 9:41 PM PST
The trees in the background of the page are generated with TreeSprouter, a new PHP program in development at SproutWorks. TreeSprouter "grows" trees by simulating growing branches.

The project is now at the "twig" level, further enhancements will produce a "leaves" build.


sproutworks
I have made a demo page for the PHP tree script I made a while ago. I modified it so that it includes something you type in the field inside the image. I chose just about the simplest way to incorporate random text, but it looks kind of neat.

Make your own tree at
http://www.sproutworks.com/treedemo.php

For those interested in how this works, the basic of this program is a function that draws a branch, given the color of the branch, and it's starting coordinates. The branch is drawn by chooing random directions in which to grow the branch. Randomly, new branches are started.

The function does not run truely recursively. I was having problems with the level of recursion, so I simulated a stack with a simple array of coordinates, and called the branch function in a loop.

I found this to be an interesting program to write, and there are many ways to expand this program. It would fit well with hierarchical structures, such as sitemaps, or directories. I also have an idea for an image that represents the growth of a blog.


sproutworks
I thought of a neat idea the other day, and I made it a reality. I wrote a PHP script that reads Yahoo's Buzz Index site, where they list popular search terms. The script adds all the search terms to my LiveJournal topics database. Then it searches all the indexed LiveJournal posts for those topics, and saves them in the index. The result is hundreds of new automatically generated pages that are related to popular things on the Internet.

Check out the results here:
http://www.sproutpics.com/livejournal.php



sproutworks
SproutFramework

I have been hearing about Ruby on Rails a lot lately. I finally decided to try it to see what all the fuss is all about. I found a Windows installer that made installing Ruby easy. I installed Rails with Rubygems, a package manager for Ruby. Gems makes installing stuff really easy. I followed a couple tutorials I found on the rubyonrails.com. Even though I didn't finish my simple tutorials yet, I realize my Rails can help me to create web applications.

Rails is an MVC framework (model view controller) that is written in Ruby. I have heard about MVC before, but I haven't decided to check it out until now. From what I've learned so far, I have become determined to integrate MVC into my core web programming practices.

Scaffolding makes it simple to turn your database tables into a functional application. The scaffold is a generic program that provides basic viewing and editing of your data.

Rails also has generators that can start writing your code for you, when you want to move beyond the scaffolding. You can generate the code for models, views, controllers, and a few other things. The code will come with some default behavior, which you can modify to better suit your needs.

PHP Framework

Rails is great, but I have about 30,000 lines of PHP code that I wrote and I'd like to continue using. So I decided to write a framework in PHP that emulates some of the things I like about Rails. I thought about what features I wanted for a while, and about how I would structure my code. When it was time to write code, I wrote the DatabaseInterface class first.

DatabaseInterface

DatabaseInterface aims to serve a similar purpose as Rails' ActiveRecord. It asks the database about what a table's structure is, to pass along to the model. It also builds SQL and performs queries. The idea is to be able to do most things without needing to write queries by hand.

Model

The Model class stores information obtained from the DatabaseInterface, and defines relationships between sets of data.

Controller

The controller is where the data is processed, and tags are rendered. The tags are used by the View to produce the final output. The view reads templates which can contain references to the object being viewed, and other objects.

Zend PHP Collaboration Project

On October 20th, Zend announced that they are partnering with IBM to co-develop PHP technologies. They are making a PHP IDE based on Eclipse, an open source integrated development environment. I am really interested in trying this new product. I've been using PSPad, and I just installed Zend Studio 5 beta 2. Zend Studio's features are very nice. I haven't explored most of the new features yet. The code folding is nice. My main complaint is that Zend Studio uses almost 200M of RAM sometimes. I have no idea how it is implemented, other than it's written in Java.
Also announced was the development of a new PHP application framework. Maybe it will be considered the Rails of PHP.

Collaboration Site


sproutworks
I have been evaluating Zend Studio 5 beta 2 for my many PHP related projects. It contains the things I like about the older versions, and also some of the things that I dislike. I like the features it contains. The auto suggest feature is nice, but sometimes it delays my typing as it is loading. Zend Studio, written in Java, can be quite a memory hog. Sometimes it causes the Java process to consume almost 200M RAM. I think that's a bit much for an IDE. Then oddly, it can drop down to only a few megabytes. Also, the file open dialog box is annoying. It keeps putting me in the My Documents directory, which is not where my web projects are located. Despite it's performance shortcomings, I will continue to use Zend Studio, while keeping an eye out for their new Eclipse based IDE.


sproutworks


sproutworks
I've added some basic pagination to the RSS Search Engine. I made a script that draws an arrow and a page number for the page buttons.
http://www.sproutsearch.com/feeds

More features will be coming.

Also, sproutworks.com is now hosted at DreamHost. It's using PHP 5 and MySQL 5. I added a maze to the left column. This maze will link to a maze demo page.



sproutworks
My blog and RSS feed search engine is almost to the point of indexing 5 million blogs from Blogger.

I have implemented a new rating system. When you click on a blog, please vote on it.

http://www.sproutsearch.com


sproutworks
I have been adding some new features to SproutFramework. I used URL rewriting to map URLs to the dispatcher. There can now be a master template for an application, which can include sub-templates. Simple browsing of a table can be accomplished with a few lines of code.

The next phase of SproutFramework development will be making a set of widgets that perform common web tasks. Things like lists, edit boxes, scrollbars, buttons. Then, more complicated mini applications can be built with the widgets.


sproutworks
I read in the PHP internals newsgroup, that Thomas Boutell is offering the GD library project to PHP. This would mean that the GD development project would be hosted on PHP.net servers, and managed by PHP people. I hope that they make this arrangement. I am an avid user of the GD library, and it is frustrating to see that the GD extension bundled with PHP still cannot create animated GIF images. It would be possible for a whole new generation of web animations to arise if the proliferation of up-to-date GD installations.


sproutworks
I just found this site called theBroth, where you can drag colored tiles around the page, and collabote with other people online. Please visit my sproutworks room and help make a picture.

http://www.thebroth.com/sproutworks

TheBroth runs with PHP/MySQL, and AJAX for the interactive parts.


sproutworks
I just spent the last hour or so creating an interesting experiment using PHP and the GD extension. I decided to use some 3D math that was festering in my brain, and I wrote matrix and vector PHP classes. Then I used my newly formed classes to draw some lines and rotate them. I added a few lines of JavaScript, and my beautiful lines were rotating right inside my web browser.

The lines themselves are not all that interesting, what is fascinating to me is that I actually created them, and didn't let them bounce around in my head for ages. I have many ideas about assembling the lines into more structured elements. Something along the lines of 3D web interfaces that are generated from user preferences, online games, or anything with interesting pictures.


sproutworks
I have just optimized the performance of the Blogshares Idea Tracker's graph rendering program. The graphs are loading much faster now. The industry listing page now allows you to load the graph for any industry by clicking a button.


sproutworks
I have noticed a lot of queries of SproutSearch's main database table are getting slow as SproutSearch passes 8 million indexed blogs. I finally decided to do something about it after trying to add alter this table. I attempted to add a column that keeps track of the date and time of each blog's most recent post. The alter table command ran for at least 8 hours, and then MySQL either crashed or the admins killed my process. I attempted this a second time without making a new index, which also failed.

I figured I would just create a new table with the extra column and write a program to slowly copy everything over. The first version of this PHP program queried 10,000 rows of data from the old table and inserted them one by one into the new table. I set up a cron job to run this every 10 minutes. Once the new table started getting big, the cron jobs were overlapping, some records were not copied, and copy processes started backing up.

It dawned on me that I'd better learn something about MySQL optimization. I read some online articles and decided to try using mysqli_multi_query to copy the records. That would reduce the network overhead. The program ran several times faster but I wanted to look into other methods. I tried using prepared statements, which wasn't much better.

I found this excellent article (http://www.informit.com/articles/article.asp?p=377652&seqNum=4&rl=1) which said if I use the insert format like:

insert into table (column1, column2) values(val1, val2), (val1, val2)...

MySQL wouldn't have to flush the index after every insert. I made my program create a giant insert statement in this format. I tried it out and it only took a few seconds when the new table was empty. I modified the program to run 10 batches of 10,000 records, which would take a few minutes. This program has been running for a few days, and all my data is finally in the new table.

I am still having problems with the table being locked during lengthy select statements. It causes certain pages to hang for a long time. I am now copying all the data from a MYISAM table to a INNODB table because it has row level locking.


denis91221
www.commodityrentals.com/" target="_blank">Online Rental PHP Script
www.commodityrentals.com/" target="_blank">
www.commodityrentals.com/">DVD Rentals Script commodity rentals is the most comprehensive Online Rentals Business script Creator script today. It comes with a full E-Commerce Capacity and is ready to go, out of the box. It can get your www.commodityrentals.com/" target="_blank">www.commodityrentals.com/" target="_blank">Video Games Rentals Scripts
commodity Rentals is the most comprehensive Online Rental Business Creator script today. It comes with a full E-Commerce Capacity and is ready to go, out of the box. It can get your Online Video Rental Systems business up and running within a matter of hours. Built on a fully extendibles and customizable platform, Video Rental Software makes use of open attribute architecture, allowing you to add your own Video Rental Script attributes and create your own customized version of your online Video Games rental business. This script is similar to the Video Games Rental Systems except that the attribute template is pre-populated with the Video Games Rental Software attributes and that replaces the DVD attributes. Mostly everything else remains the same. commodity Rental.com provides Online Video Games Rental Script are growing more popular by the minute. This isn't a bit surprising given the benefits of Video Games Rental PHP Script. It's extremely easy to rent video games online, and it's also very convenient, cost effective, and a great way to try tons of games. www.commodityrentals.com/" target="_blank">Buy Real Estate Rentals Script Commodity Rentals is the most comprehensive Real Estate Property Rentals script Creator script today. It comes with a full E-Commerce Capacity and is ready to go, out of the box. It can get your Real Estate Rentals script up and running within a matter of hours. Built on a fully extendibles and customizable platform, commodity rentals makes use of an open attribute architecture, allowing you to add your own rental attributes and create your own customized version of your online rental business.

www.commodityrentals.com/">Vacation Property Rentals Script
Each of these vertical portals makes it easy for buyers who do not want to spend time in adding standard attributes for their line of business and get it up and running quickly. It also provides with a full attributes template listing, already integrated, based on the popular www.commodityrentals.com/demo.php">Real Estate rental sites already doing business currently. www.commodityrentals.com/">Online Books/E-Books Rentals Script Commodity Rentals is the most comprehensive Online Books Rentals Creator script today. It comes with a full E-Commerce Capacity and is ready to go, out of the box. It can get your online books rental software up and running within a matter of hours. Built on a fully extendibles and customizable platform, Commodity Rentals makes use of an open attribute architecture, allowing you to add your own rental attributes and create your own customized version of your online eBooks Rentals script business. This online ebooks rental script is specifically tailored for people wanting to start a online ebooks rental software Business within a very short time. Fully E-Commerce ready, this system comes with a E-Books Rentals attribute template and a fully customizable "look and feel" template of the site.

www.commodityrentals.com/">Buy CDs Rentals Script Commodity Rentals is the most comprehensive Online Rental Business Creator script today. It comes with a full E-Commerce Capacity and is ready to go, out of the box. It can get your Online Rentals business up and running within a matter of hours. Built on a fully extendibles and customizable platform, commodity rentals makes use of open attribute architecture, allowing you to add your own rental attributes and create your own customized version of your online rental business.Commodity Rental.com provides online CDs and DVD business in the world. You can create an online business with us. Our feature will be general No programming required, set up in 5 minutes. Works on windows, UNIX, LINUX platform. 100% open source, A web based control panel for site administrator. Free access to product updates, Easy to configure – appearance, site configuration and other settings and also having good product catalog with us like Unlimited product (CD) categories, Unlimited number of products (CDs), Unlimited depth (level) of the category tree, Unlimited number of CDs attributes, CD HTML description. CD flags e.g. Available, Special, Available from date, Adult etc, Control on Available and total stock. Reviews of CDs entered by customers, Studio’s information.
www.affcommerce.com/">Affiliate Based Ecommerce Shopping Cart Script
Affiliate commerce is a unique, one of its kind affiliate based ecommerce script. It allows you to create a network of affiliates with customizable shopping cart/e-shop interfaces to sell your products. You would have full control over your pricing and fulfillment. Fully e-commerce ready,Affiliate Commerce allows you to sell your products rapidly. It also has many additional modules available, like product rentals, etc. Now at a REDUCED PRICE!!





sproutworks
Presenting SproutWorks 3D Digg Explorer

www.sproutworks.com/digg3d.php

I have just put SproutWorks 3D Digg Explorer online. It is my latest attempt to display textual information in an interesting way. I use JavaScript with jQuery to script the interactive elements of it. It fetches a JSON string from my server, and creates a three dimensional scene using the data from it.