Showing posts with label php. Show all posts
Showing posts with label php. Show all posts

Tuesday, September 8, 2009

Using PHP code to get the current page URL?

the following function will get the current page URL using php code:

<?php

function currentPageURL() {

$curpageURL = ‘http’;


if ($_SERVER["HTTPS"] == “on”) {$curpageURL.= “s”;}

$curpageURL.= “://”;

if ($_SERVER["SERVER_PORT"] != “80″) {

$curpageURL.= $_SERVER["SERVER_NAME"].”:”.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];


} else {

$curpageURL.= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];

}

return $curpageURL;

}


echo currentPageURL();

?>

Wednesday, August 19, 2009

What is TikiWiki and how to install that one in Localhost?

Tiki is a leading open source full featured content management system (CMS) and Groupware (Intranet) suited for many types of online communities. Features include Articles, forums, blogs, directory, topics, wiki, polls, trackers, image galleries, webmail, and much more. Using PHP, MySQL and Smarty.

The main features of TikiWiki:

1) Maintaining the Wikies (Which is like wikipedia)

2) Maintaining the Forums (which is like phpBB)

3) Maintaining the Blogs (Which is like WordPress)

4) Maintaining the Articles (Which is like Digg)

5) Maintaining the Image Gallery (which is like Flickr)

6) Maintaining the Map Server (Which is like Google Maps)

7) Maintaining the Link Directory (Which is like DNOZ)

8) Maintaining the Multilingual (Which is like Babel Fish)

9) Maintaining the Bugtracker (Which is like Bugzilla)

10) Maintaining the Rss feeds (Which is like in & out)

11) It is free source software (LGPL).

Why use the TikiWiki:

1) Tiki has fine-grained user and group permissions. This allows you to easily give users access to exactly what they need.

2) Tiki is uses the powerful template engine called the Smarty, so we can easily maintained and customizing the templates.

3) Tiki uses the database abstraction which uses the ADODB and MySQL.

4) As a leading CMS application, Tiki has the many awards by the software community.

How to install the TikiWiki

1) Download the latest version of TikiWiki from the site : http://info.tikiwiki.org/tiki-index.php?page=Get+Tiki&bl=y

2) Unzip the downloaded file and place that file at your localhost www folder.

3) Run the file like http://localhost/tikiwiki-3.0/tiki-install.php

Download this from :

URL: http://info.tikiwiki.org/tiki-index.php

Thursday, July 30, 2009

Oscommerce error Out of memory (Needed 1048548 bytes)


5 - Out of memory (Needed 1048548 bytes)


This error is not occur with the php, this will happen about the mysql error.

The only solution is to

Need Help Optimising your database? Looking for a good to OPTIMIZE / REPAIR specific tables, databases, or servers? Here is a code that may help. Very easy to install. No files to change.

I take no credit for this contribution. I merely found it when trying to find ways to
improve my site performance. Here is the link to the original file and article:-

http://dev.mysql.com/doc/refman/5.0/en/optimize-table.html


we can down load that file from the following link :

http://addons.oscommerce.com/info/4647

and run that file with give the database details.
then that error might not occur.

Tuesday, July 21, 2009

Using PHP code connect to FTP and upload files.


The following code will be connect to FTP using php code and upload files to FTP server.

<?

$ftp_server="HOST NAME";
$ftp_user_name="USER NAME";
$ftp_user_pass="PASSWORD";
$conn_id = ftp_connect($ftp_server);

// login with username and password

$login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass");

if ((!$conn_id) || (!$login_result)) {
echo "authentication failed";
}
else
{

$source_file="uploads/".$fileName;
$destination_file="/htdocs/".$fileName;
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);

}

ftp_quit($conn_id);

?>

Monday, July 20, 2009

Call the php file using javascript.

we can the call the php file in javascript following syntax:

<?php

//"ip.php" example- display user IP address on any page
header("content-type: application/x-javascript");
$serverIP=$_SERVER['REMOTE_ADDR'];
echo "document.write(\"Your IP address is: " . $serverIP . "\")";

?>

to call the php file in html file like

<script type="text/javascript" src="ip.php"></script>




Hope it will be helpful.

Anil Kumar Panigrahi

Wednesday, July 15, 2009

How to get the tiny url using php code?

The following php code will generate the tiny urls


<?php

function getTinyUrl($url)
{
$tinyurl = file_get_contents("http://tinyurl.com/
api-create.php?url={$url}");
return $tinyurl;
}

$url="http://www.awesome-gallery-blogspot.com";
echo getTinyUrl($url);

?>



It will gives the url : http://tinyurl.com/ldq9aq


This will be useful when we are trying to post our url in different blog.
If we want more impressions without knowing the url name then we can use this function.

Tuesday, July 14, 2009

Friday, July 10, 2009

Complete reasearch on Audio and Video Streaming

The complete information about Audio and Video Streaming usinf FFMpeg and PHP web development language, By Anil Kumar Panigrahi,


Audio and Video Streaming -

For any information we can contact me at anil4u@in.com or kumaranil21@gmail.com