Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 27th, 2006, 05:55 AM
Ameen_France
Guest
 
Posts: n/a
Default Classes in PHP

Can anybody help me by giving some examples for classes in PHP. please
provide me some simple and understandable classes examples.
regards
Ameen

  #2  
Old January 27th, 2006, 06:05 AM
Carl Vondrick
Guest
 
Posts: n/a
Default Re: Classes in PHP

Ameen_France wrote:[color=blue]
> Can anybody help me by giving some examples for classes in PHP. please
> provide me some simple and understandable classes examples.
> regards
> Ameen
>[/color]

Try these:
-
http://www.google.com/search?q=php+o...en-US:official
http://www.google.com/search?hs=ntL&...es&btnG=Search
-
http://www.google.com/search?hs=dE1&...op&btnG=Search

Carl
  #3  
Old January 27th, 2006, 02:55 PM
Double Echo
Guest
 
Posts: n/a
Default Re: Classes in PHP

Ameen_France wrote:[color=blue]
> Can anybody help me by giving some examples for classes in PHP. please
> provide me some simple and understandable classes examples.
> regards
> Ameen
>[/color]

http://www.phpclasses.org

  #4  
Old January 27th, 2006, 04:05 PM
Jon
Guest
 
Posts: n/a
Default Re: Classes in PHP

They're very simliar to that of C++ really. You use the new keyword to
instanciate a class within an application, and class data is handled the
same way as in C++ (for the most part). If you know OO programming, a google
search should be all you need to write PHP classes (just to get the syntax
down).

"Ameen_France" <ameen.pondy@gmail.com> wrote in message
news:1138340785.566362.284920@g44g2000cwa.googlegr oups.com...[color=blue]
> Can anybody help me by giving some examples for classes in PHP. please
> provide me some simple and understandable classes examples.
> regards
> Ameen
>[/color]


  #5  
Old January 28th, 2006, 03:45 AM
s a n j a y
Guest
 
Posts: n/a
Default Re: Classes in PHP

Ameen_France wrote:[color=blue]
> Can anybody help me by giving some examples for classes in PHP. please
> provide me some simple and understandable classes examples.
> regards
> Ameen
>[/color]


well do you have any experience with OO programming? If you do not you
might wanna pick up a OO book. You can even pick up a java or C++ book
and read the classes and objects chapter. PHP classes are based on these
languages anyway.

Sanjay
  #6  
Old February 7th, 2006, 08:15 PM
Jim Michaels
Guest
 
Posts: n/a
Default Re: Classes in PHP

I got this from the user notes in the manual.

A class to encrypt, decrypt data! if you have problems with using it please
visit my site http://www.alexandrub.tk and mail me using Contact section! I
use it to encrypt POST and GET data! I don't remember his name but thanks to
how recognize his code in the binFromHex function!
<?php
//copyright www.alexandrub.tk
//ver 1.00
class cript {
var $key;
var $td;
var $time4keyToChange;
var $iv;
function cript($aKey='time',$aTime4keyToChange=3600) { //constructor
$this->time4keyToChange=$aTime4keyToChange;
if($aKey!='time') {
$this->key=$aKey."&".intval(time()/$this->time4keyToChange);
} else {
$this->key=intval(time()/$this->time4keyToChange);
}
$this->td = MCRYPT_RIJNDAEL_256;
$this->iv = "qe3jigneqfrgnqw2egfmas4qetjkn5lg";
}
function hexFromBin($data) {
return bin2hex($data);
}
function binFromHex($data) {
$len = strlen($data);
return pack("H" . $len, $data);
}
function criptData($data) {
return $this->hexFromBin(mcrypt_encrypt($this->td, $this->key,
$data, MCRYPT_MODE_CBC, $this->iv));
}
function decriptData($eData) {
return trim(mcrypt_decrypt($this->td, $this->key,
$this->binFromHex($eData), MCRYPT_MODE_CBC, $this->iv));
}
}
return true;
?>


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles