Jump to content

unknowncat

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Posts posted by unknowncat

  1. I use the date() function a lot. Easy to work with the raw number.

     

    Make a db input of 15 int, then set the date/time with Linux Timestamp.  Set something like $now = date(); then use $now in the sql insert.  This way all db times are set at that standard, and whenever retrieving that data, you can manipulate or use that in whatever way you want.  Really helps for finding the difference between two times, and can be presented however you want using something like

     

    date("F j, Y", $dateEarned);

  2. First let me say I'm no expert at this.  But it's a matter of Parsing the data.  Your cUrl is not your real question here.  You'll be working with the DOM (document object model).

     

    I havn't tested it, but how about something like this:

     

    foreach($buffer->find('body') as $stores) {
        $item['storename']     = $article->find('div.storename', 0);
        $item['detail'] = $article->find('div.storedetail', 0);
        $stores[] = $item;
    }
    

     

    Their code at myprimemobile kindof not good cuz they're not putting data into appropriately named divs, they're using a bunch of tables in divs..  gonna have to hack the results, maybe use results from the snippet above to get the data separated for each store, then use a similar snippet to break down the html for each store table in the storedetail div results.  Please be sure to share the final code when you get it nailed, I could apply that on a thing or two..

  3. If this is the model for urls you're wanting to use on your site (i see you used 'mysite.com' in your example) then you can have your server interpret all such urls into GET variables using .htaccess file and rewrite rules.  Depending on what you want to name your get vars, here is an example:

     

    Options +FollowSymLinks
    RewriteEngine on
    
    RewriteRule our-company-(.*)-(.*)\.html our-company.html?letter=$1&number=$2

     

     

  4. Hello All,

     

    I'm 31, been writing php in some level of skill or another off and on for nearly ten years.  Love it.  Best when my projects or clients toss me some new feat to figure out.  In the figuring out part I've passed through here many a times, but never really hung out.  Tonight I had a revelation.  It's time to give back to the community as best I can with answers when I can come up with them and hints when I can b.s. my way through them!

     

    Currently working about part time and living with the equivelant income.  No, still havn't mastered massive passive income.  Well, maybe a little.  Oxymoron?  a little massive passive...  But anyways, I've got about a dozen sites of my own going, sell some scripts, and do code as well for just about anybody who asks me to.

     

    Gradually working my way into the use of frameworks, absolutely in love with curl and xml and recently started working on my own search engine.  Nothing fancy, but for the purposes it does the trick.  I'd say I try to spend about a fifth of my productive time in learning new stuff.  And I'm here and plan on coming back often to answer whatever questions I can and tap some brains out there to raise me up a level or two.

     

    Other than php, I spend a lot of time camping, traveling the usa mostly, reading (just finished wizards first rule), writing rhymes, cuddling with the sweetness, drinking dank coffee, and sleeping in!

     

    If you read this far, I thank you!

  5. Hello,

     

    I've been spending too long searching for a good solution, i wonder if anyone on here might be able to help.  I'm working on a few sites that need search functionality, and i already have a simple LIKE %$searchter% type query.  But we need more advanced search abilities!  like multiple keywords, results ordered by relevency, boolean searches, etc.  We're querying the mysql database for the 'title' and 'description' fields..

     

    Can anyone recommend a good php class or script to use?

     

    Thanks in advance!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.