Forum Moderators: coopster

Message Too Old, No Replies

im bored (looking for PHP challenges beyond the basics)

         

kumarsena

3:02 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



hey guys,

yes, u read rite...im bored...have been working with php in my spare time for several months (or is it a year now?), and although im no programmer by nature, im loving it. but now im bored...have done all the basic stuff, although not everything is remembered. i just wanna do something more than handling form data and sessions and echo statements (yes, i know these are invloved in mostly everything ). somnething that required a little bit more challenge. so i was hoping the good folks at WebmasterWorldorld would have some answers to what i shouild embark on. photogalleries or guestbooks or anythign like that. dont mind re-inventing the wheel, its for having fun, really..(never though id have fun playing with programming..)

so, any advice and pointers appreciated..

tnx
kumar

Birdman

3:24 pm on Oct 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Personally, I think the image creation functions(ala GD) are fun and you won't get bored for a long time! ;) There's alot you can do with them.

Check out nyphp.org's GD Intro [nyphp.org]

moltar

3:26 pm on Oct 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Try solving some mathematical eqations. I had some fun with matrices back when I was in high school.

mincklerstraat

3:45 pm on Oct 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm in there with birdman on learning the image stuff; it can be an enormous rush. It's a big pain, though, when dealing with transparency; you'll even find that what works on one install of linux / php / gd might not work on another, when it comes to transparency. However, I've had some marvellous times dinking around with gd.

I'd also get multi-dimensional arrays down so you are really, really comfortable with them, and can easily manipulate data by building up big arrays, and get what you want out of these arrays by using the proper keys.

A more exotic sorta thing is the ming library, using php to make flash dynamically - I've never done any of that, but I bet it could be fun, though perhaps not always very practical.

And maybe the best: find your own challenge. Of the sites that you see, could things be done better? Could you organize information better, or present a better interface? Is there anything you really feel needs to be done, or that you think would be tremendously cool? This can help you brainstorm into thinking up a new application. Download some of the scripts with the best reputations, learn from how they're put together, get frustrated with their limitations, and then make the app that does what you truly want it to.

You're already running your own site; don't be afraid to run third-party scripts on it, to get more of the feel of day-to-day site maintenance and needs. This should also help you get more tuned in to what the world wants and needs in php.

kumarsena

4:08 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



tnx to all of u guys (i knew minckler was gonna give me somthing interesting he he)...

i think i will take a look at the gd lib. also the array and maybe also osme math functions just to get teh feel of it.

as for third party scripts, i was a bit afraid to use them, as i was planning on using my site as a reference when applying for jobs, so doing everything myslef would be better, but as u have pointed out, there is alot to learn from using them, and i never thought of that. will have a go. planning on posting my scripts so far as tutorials on my site as well, any ideas on how to write them..? should i assume reader is complete php newbie or assume reader has some prog experience..?

as for working with php professionally, how is the job market, say in uk? im sure there are people here who are 'pros'...any suggestions on how to approach would be appreciated. besides, im in norway, but EU is interesting as well.

well, enough sidestepping, but keep teh sugesstions coming in, im sure someone else would be interested as well.

once again tnx guys..
kumar

mincklerstraat

4:44 pm on Oct 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Different expectations for readers' levels will depend on the topics of the tutorials. E.g., in describing the basics of how to do forms with $_POST and $_GET, you won't want to assume any knowledge of sessions. A tutorial on generating PDF documents probably should. When I was a newbie to PHP, I was kinda peeved that the intro stuff wasn't all in one easy-to-get at place on most sites, and I wasn't always sure what I'd understand and what would suddenly go off into techno-babble. If you are doing tutorials aimed at different level audiences, you could add a field to your tutorials table, with an integer indication of 'level' from newbie to guru, to help your readers sort or search your articles.

lazydog

9:03 pm on Oct 20, 2004 (gmt 0)

10+ Year Member



Hi!

If you have time and are good with php, maybe you should consider contributing code to PEAR. You are sure to find something that interests you - [pear.php.net...]

This is still a draft, but is a good example
[pear.php.net...]

Let us know how it goes :-)

Saurabh.

Code Sentinel

5:34 pm on Oct 21, 2004 (gmt 0)

10+ Year Member



I've been trying to wrap my head around a php spider.. I need to learn regular expressions first.

I should probably also memorize things as well.. it's no fun going to the manual and looking for examples or shuffling through old code for everything I want to do. So many functions in php though.

mincklerstraat

6:48 am on Oct 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Getting to know regex is time-consuming, but once you know it well you'll hardly believe you ever got by without it. Remember though not to use it where you can use things like strpos and str_replace when you can, since they're faster.

I still hit the manual many times every day, often even looking up things you'd think I 'should know', to see which order the parameters need to be in, or if there's any extra info I need to know. You might find that just coding and using the manual as necessary by themselves are enough for getting those functions in your head. It's much more important that you know how to find the information you need fast, and where to go for certain kinds of situations, than knowing a lot of stuff verbatim. You can also get the .chm (windows help format) of the manual 'extended' version with comments if you're on windows.

A spidering program will work ok in php (in fact php's easy manipulation of strings should make it very easy), but remember that stuff that needs to run blisteringly fast needs to be written in a compiled language like C, and that PHP isn't good at 'background' processes or daemons. As long as this is just a basic spider that isn't expected to keep track of more than a few thousand pages, or spider more than a few at a time, this will work in PHP; otherwise you might be disappointed with the time you put into such a project.

Code Sentinel

11:01 pm on Oct 22, 2004 (gmt 0)

10+ Year Member



I'm not looking to spider the web, I want a site search engine for a site that uses more than 1 database and each table in the database handles a different section and do not have similar schema.

There are options out there but I found phpdig to be incredibly slow(for semi large site), that mnmnmnogo or whatever might as well be written in greek, other scripts I've run across do filesystem searches only or have some restrictive GNU license and for non profit only sites.

I got an idea how it should work, making it all the parts work together is another thing.. I'm thinking about doing it with objects so once I finish a part I won't have to remember how it works exactly :P But then I start wondering what kind of memory requirements it would take to hold all the URLS found in memory while spidering.. script execution time limits.. etc etc.

It's coming to the point where if I'm gonna do this I might as well not do it half assed.. because it's already gonna take a lot of work to get a half assed spider working (with my current limited knowledge of php, mysql, http 1.0 or 1.1)

I want something FAST but won't bring a server(running it or spider target) to its knees, maybe multiple spiders for more speed, full error checking and recovery(a page times out revisit), full template results page with no special configuration other than telling it which database to use, robots.txt compliance(more parsing and spider logic doh), I want it all :P

I don't really know where to begin.. it just seems like so much work for a simple site search script.. and only because my database schema is a mess and I'm unsatisfied with what's currently available(free spiders at least).

mincklerstraat

4:25 pm on Oct 23, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



For this one I think I'd really recommend learning that greek (with mnogo - btw, there's a 'candidate PEAR' class for it, [pear.php.net...] , you can get the source there too) or trying htdig. Writing a good spider can be a whole lot of work. Re-organizing the site might even be a better option, setting up a 'search' db table with the contents of all the fields you want searchable, and a url. Getting the info from the db itself should be a lot easier than making relevant results from spidering, I'd guess.