Home » Archive

Articles in the PHP Category

PHP »

[22 Apr 2013 | No Comment | ]

If you need to create a widget & showcase the latest video uploaded in youtube channel to your users. Can be in your website or advertisements or anywhere, it is now possible with youtube API.

Youtube feeds
The API returns a videos feed in response to a request to search for videos. A videos feed contains a maximum of 999 entries. To retrieve search results, send an API request to the following URL:
http://gdata.youtube.com/feeds/projection/videos?v=2
Videos uploaded by a specific user
To request a feed of all videos uploaded by the currently logged-in user, send a …

PHP »

[14 Sep 2012 | No Comment | ]

In this tutorial we are going to see how to get URL of current page using PHP.
Tutorial Difficulty:
Basic users
Getting Current Page URL:
We are going to use PHP built-in functions to get current page URL in PHP.

$_SERVER['HTTP_HOST']
$_SERVER['REQUEST_URI']

Let us discuss each one seperately
Note: I was checking the code in the following URL
http://www.designscriting.com/getting-current-page-url-in-php
$_SERVER['HTTP_HOST'] function in PHP
This is a simple php function which displays the host name of current page.
Example:
<?php
$hostName=$_SERVER['HTTP_HOST'];
echo $hostName;
?>
Ouput:
www.designscripting.com
$_SERVER['REQUEST_URI'] function in PHP
The above function displays the remaining URL of the current page other than the host name.
Example:
<?php
$pathName=$_SERVER['HTTP_HOST'];
echo $pathName;
?>
Output:
/getting-current-page-url-in-php
Getting Current Page URL in …

PHP »

[17 May 2012 | No Comment | ]

In this post is all about creating simple online voting system using PHP, jQuery Ajax. Displays the number of votes per article, This is not  IP Address based voting but restricts user to vote only once. Let’s start building it.

Requirements for Voting System:
Dificulty: Intermediate
S/W Needed: PHP, Mysql, HTML Editor
Create Article Table:
As a first step in the process of creating this voting system add the Table to the Database.
CREATE TABLE Article (
id INT PRIMARY KEY AUTO_INCREMENT ,
heading TEXT ,
content TEXT ,
rating INT NOT NULL DEFAULT ’0′ );

Voting.php
This file contains the UI …

ActionScript 3.0, Flash CS5, PHP »

[18 Sep 2011 | 2 Comments | ]

I was trying to pass as3 data variables / values from Flash as3 to PHP. I know it is simple to make new request through navigateToURL(), it executes well and passes the data to php and runs the script but opens new browser window with url query variables. So this will not work when we wanted to pass data silently to serverside scripts from Flash.
Remember what you need to run:

Flash CS3 – CS5
PHP

 

Method 1: Passing varaibles from Flash as3 to PHP:

one way of sending values from Flash actionscript 3.0 to …

PHP »

[14 Sep 2011 | No Comment | ]

Using PHP and jQuery combination it is easy to add image cropping functionality to our web application or admin side scripts. Here we are going to see PHP tutorials or Ajax, jquery plugins to work with image cropping. Image cropping functionality is need to give user some authority to choose or select their own profile picture or set avator image on their own.
Take a look at best Image cropper tutorials or tool here. If you know any better cropping tool please leave a comment.
PHP and Jquery Crop:

Tutorial to crop image …