• Connect with Me

    Follow Me @ Twitter
    My Facebook Profile
    My Orkut Profile
    My FriendFeed Profile
  • Archives


  • My blog is worth $2,258.16.
    How much is your blog worth?

  • My Creation

  • Creative Commons License

How To Create A Random Message Generator Using PHP

Objective: User gets a new message every time; he  refreshes the page.

Requirements: Adobe Dreamweaver or any Open Source Editor like Amaya, Aptana Studio etc.

Code:

<?php

$thoughts = “WORK IS WORSHIP

AS YOU SOW, SO YOU REAP

BARKING DOG SELDOM BITE

KNOWLEDGE IS POWER

SHOOT FOR THE MOON, YOU WILL REACH THE STARS

AN APPLE A DAY KEEPS THE DOCTOR AWAY

I AM WHAT, I AM

TO ERR IS HUMAN, TO FORGIVE IS DIVINE

WHEN THE NIGHT IS DARKEST, THE DAWN IS NEAREST

THEY CONQUER WHO BELIEVE THEY CAN

NOTHING IS IMPOSSIBLE

TIME &amp; TIDE WAITS FOR NONE

THINK BEFORE YOU LEAP”;

$thoughts = explode(“\n”, $thoughts);

$chosen = $thoughts[mt_rand(0, count($thoughts)-1)];

print $chosen;

?>

How To Create Simple PHP Widgets

Objective:

  • Creating a simple PHP Widget, which will allow the user to reach the result page of Google! from your site.

Requirement:

Creating the form(index.htm):

<form action=“google.php” method=“get” name=“query_form”>

<input id=“search” onclick=‘value=”” ‘ name=“search” type=“text” value=“Enter the search term” />

<input id=“submit” name=“submit” type=“submit” value=“Submit” />

</form>

PHP Script(google.php):

?php
$url=”http://www.google.com/search?q=&#8221;.$_REQUEST[‘search’];//Adding the user query with the URL
header(“Location:$url”);
?>

<?PHP

$url=http://www.google.com/search?q=&#8221;.$_REQUEST[‘search’];

header(“Location:$url”);

?>

Download the full script, here

Even you can create more widgets just by changing the URLs. I’m mentioning few search URLs:

Thanks to SachinKRaj for guiding me on this script. Do post your comments 🙂

Site Checker & Contact Me : New Tools on my Site

Hi Folks,

Recently I have added two new tools on my website shubhamoy.com. So let me introduce both the tools to you:

Site Checker

Site Checker by Shubhamoy

Site Checker by Shubhamoy

This is a very effective tool. It allows the user to check a particular website for malware stored or distributed by it. So next time you find a suspicious website; just check it here.

Contact Me

Contact Me - Shubhamoy

Contact Me - Shubhamoy

This is my favorite tool; it enables my users to mail there doubts, suggestions and queries to me from my site. No need to open your mail account and type. So it saves your time as well as it becomes very handy.

Finally if you find any error or a bug do intimate me. I’ll try to fix it on ASAP basis. I’ll be waiting to hear from all my visitors.

Fix PEAR Installation on WAMP Server

Hi Folks,

shubhamoy_wamplogo

Few weeks later I faced a great trouble while installing PEAR on WAMP Server.

The Problem:

The PEAR path is wrongly set to C:\php5\pear automatically than its original path.

The Solution:

  1. Edit every php.ini file, change INCLUDE_PATH to your path where WAMP Server is installed(e.g. C:\WAMP\bin\php\php5\includes).
  2. Now run go-pear.bat, and follow all the instructions. If everything is fine then its OK. You can check it by running http://localhost/phpinfo(). Else if go to Step 3.
  3. Right Click My Computer->Advanced Tab->Environment Variables->Add New User Variable->PHP_PEAR_INCLUDE_PATH->Add new value->The path where PEAR is installed(e.g. C:\WAMP\bin\php\php5\PEAR).
  4. Do post your results soon.

If  any step is not clear or you have some doubt then kindly post a comment. Even if you insist then I’ll post thumbnails also.

Reblog this post [with Zemanta]

Multiple Web Search

Hi Friends,

Today I introduced a Multiple Web Search in my Website. It’s really amazing and very helpful as you enter a single query, you get results from three search engines at a time.

How to use:

  1. Enter a keyword in the text area. And click Submit.
  2. You will obtain results from three search engines, i.e., Google,BING & Yahoo.
  3. All the results will be displayed in single page(three frames and 33% each).

Its development:

This whole creation is the result of SachinKRaj’s guidance. He guided me all along the development. Hats Off to him 😀

Update:

Today I launched its Version 2.0. I had made it free from few bugs and also added a new feature which will allow you to select a single search engine also. So do check it out. Here is its snapshot.