Page 1 of 1

New to PHP, can you guide me?

Posted: Sun Jul 03, 2011 4:49 pm
by Dooceswild
Hello, I'm looking to making a site that will do a few things : Pull information from eBay (pricing), store it in an sql database, and then display this data on my site. Of course the data it's pulling will be specific, not ALL data :)

My question is this: I know very, very little PHP. I know I'm going to have to start from scratch and I know I'm going to have to do lots of work. How difficult is what I want? It seems like it would be on the easy end of the PHP coding meter. I'm sure I'll need one script to pull the information and store it, then a cron job to run it nightly, but I'm kind of unsure where I should start.

I'd very much appreciate any assistance, and I want to thank those that don't just flame me for being a newbie.

Re: New to PHP, can you guide me?

Posted: Mon Jul 04, 2011 6:19 am
by social_experiment
From the description you gave it doesn't seem like a too difficult task but it is best to put down what you want to do. Have a outline makes it easier but from experience i've found as soon as you start doing actual coding, more and more things you didn't anticipate starts to pop up, i've im not mistaken this is could be similar to scope creep.

To retrieve details from another website / file you can use get_file_contents() and then to filter out what you want, look at using regular expressions. As for cron jobs i have no idea how they work :)

You can also browse through and search the forum because it's likely that someone else wanted to do a similar thing and already received assistance on how to proceed.

Re: New to PHP, can you guide me?

Posted: Mon Jul 04, 2011 10:40 am
by Noodleyman
sounds like you want to re-do one of my old projects. You are best off using the eBay API to get all your data. It is quick, reliable and well written.

Check out the ebay developer network information. Depening on which API you want to use, you can use either REST or SOAP. rest is by far the easiest. (send a URL to ebay, and get results). This is only supported on a limited number of functions, but I think will work for what you want.

If you are new to PHP and have little or no development background, its going to be a very steep learning curve, but a fun one :).

With a bit of background, you should be able to do what you want in a couple hours.

However, how do you know what items you want to get information about? Do you have a list of ebay item ID's? Are they all your own items? etc.

The PHP API documentation has some examples, maybe one of those will do what you want without any modification :)