BetterPHP PHP Library
Re: BetterPHP PHP Library
Image manipulation if you are feeling up to itKamal wrote:Give us some ideas. I want to contribute :S
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
Looks good!bowersbros wrote:For my reference mainly, and for people to suggest extras:
Validation Class:Users Class:
- Secure (general security)
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
Re: BetterPHP PHP Library
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.bowersbros wrote:For my reference mainly, and for people to suggest extras:
Validation Class:Users Class:
- Secure (general security)
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
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;
}
}
/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
Ah fair enough !bowersbros wrote:Got it. see above
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
no where near done yet, im working on getting it all entered into the database.. kinda difficult without the mysql class :/jacek wrote:Ah fair enough !bowersbros wrote:Got it. see above
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.
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
$website = "http://google.com"; $folder = "./folder/images/" download($website, $folder);
Re: BetterPHP PHP Library
Was that a jokeEcazS wrote:
If you think that would be useful then feel free to make it and I will put it in
Re: BetterPHP PHP Library
Nojacek wrote: Was that a joke
I doubt it would, I just want such a thingjacek wrote: If you think that would be useful then feel free to make it and I will put it in
-
- Posts: 534
- Joined: Thu May 05, 2011 8:19 pm
Re: BetterPHP PHP Library
Give it a go?EcazS wrote:Nojacek wrote: Was that a jokeI doubt it would, I just want such a thingjacek wrote: If you think that would be useful then feel free to make it and I will put it in
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
<?php function download($url, $save_to){ if(file_put_contents($save_to, file_get_contents($url))){ return true; }else { return false; } } ?>Isn't it that simple?