BetterPHP PHP Library
Re: BetterPHP PHP Library
Kamal wrote:Give us some ideas. I want to contribute :S
Image manipulation if you are feeling up to it
Something to basically wrap the GD library functions but also take some of the pain away and maybe add some function to do things like resize images and create thumbnails.
Re: BetterPHP PHP Library
You could do something with caching.
Please check out my CodeCanyon items.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
For my reference mainly, and for people to suggest extras:
Validation Class:
Validation Class:
- Secure (general security)
username validation (remove spaces, etc)
Password validation (checks security level (types of characters required))
SecurePass (encryption and salt)
- login
register
available (checks availability of username and email and anything else)
Last edited by bowersbros on Thu May 12, 2011 6:52 pm, edited 1 time in total.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
bowersbros wrote:For my reference mainly, and for people to suggest extras:
Validation Class:Secure (general security)
Users Class:
username validation (remove spaces, etc)
Password validation (checks security level (types of characters required))
SecurePass (encryption and salt)
available (checks availability of username and email and anything else)login
register
Looks good!
Re: BetterPHP PHP Library
bowersbros wrote:For my reference mainly, and for people to suggest extras:
Validation Class:Secure (general security)
Users Class:
username validation (remove spaces, etc)
Password validation (checks security level (types of characters required))
SecurePass (encryption and salt)
available (checks availability of username and email and anything else)login
register
Maybe you should just to a login / register combined thing most of the methods inthe validation class would make more sense in the login one.
and "general security" is never a good idea, people use it and assume they are protected form everything.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
well.. im doing them seperate because login checks data, but register enters data and im trying to get register to check an array also. (so they can enter any details and it will hopefully get entered)
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
Hmm okay, well its up to you really, but the "available (checks availability of username and email and anything else)" methid should defiantly be part of the user class.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
Code: Select all
$fields = array('name','username','password','users','hey','whatsup');
while($fields){
foreach(array_keys($fields) as $field){
echo $field;
}
}
What i need is the key of the array name and the content to go together into the database for registration.. Any ideas?
/edit: got it.
Code: Select all
$fields = array('name' => 'Alex', 'last_name' => 'bowers', 'month' => 'Jan');
foreach($fields as $k => $v){
echo "Key: " . $k . " -> Value: " . $v;
}
Last edited by bowersbros on Thu May 12, 2011 6:55 pm, edited 1 time in total.
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
I don't really get your use of the while loop there In fact I have no idea what you mean
Also it should probably be a post in php help
Also it should probably be a post in php help
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
Got it. see above
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
bowersbros wrote:Got it. see above
Ah fair enough !
Yes that method makes a lot more sense.
Also, any code submission should be done in attachments here on PM me so I can add to the main .zip file.
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
jacek wrote:bowersbros wrote:Got it. see above
Ah fair enough !
Yes that method makes a lot more sense.
Also, any code submission should be done in attachments here on PM me so I can add to the main .zip file.
no where near done yet, im working on getting it all entered into the database.. kinda difficult without the mysql class :/
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
you are not forced to use the other library files. But yeah I can see how it would be
Re: BetterPHP PHP Library
Do something that downloads images from a site
[syntax=php]
$website = "http://google.com";
$folder = "./folder/images/"
download($website, $folder);
[/syntax]
[syntax=php]
$website = "http://google.com";
$folder = "./folder/images/"
download($website, $folder);
[/syntax]
Re: BetterPHP PHP Library
EcazS wrote::lol:
Was that a joke
If you think that would be useful then feel free to make it and I will put it in
Re: BetterPHP PHP Library
jacek wrote:Was that a joke
No
jacek wrote:If you think that would be useful then feel free to make it and I will put it in
I doubt it would, I just want such a thing
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
EcazS wrote:jacek wrote:Was that a joke
Nojacek wrote:If you think that would be useful then feel free to make it and I will put it in
I doubt it would, I just want such a thing
Give it a go?
I don't like to brag, but I wasn't circumcised. I was circumnavigated.
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Want to learn something new? Or maybe reinforce what you already know? Or just help out? Please subscribe to my videos: http://goo.gl/58pN9
Re: BetterPHP PHP Library
[syntax=php]<?php
function download($url, $save_to){
if(file_put_contents($save_to, file_get_contents($url))){
return true;
}else {
return false;
}
}
?>[/syntax]
Isn't it that simple?
function download($url, $save_to){
if(file_put_contents($save_to, file_get_contents($url))){
return true;
}else {
return false;
}
}
?>[/syntax]
Isn't it that simple?