Jump to content

ginerjm

Members
  • Posts

    6,906
  • Joined

  • Last visited

  • Days Won

    99

Posts posted by ginerjm

  1. First let me say I have never used curl and don't fully understand it.

     

    Now - how your script operates.

     

    1 - you setup and execute a curl call but you don't do anything with the returned value(s).

    2 - you then start a loop to do more curl calls

    3 - with each curl call you do some unknown function (I can't find it) named str_get_html

    4 - with the results of this function you do a search and then you attempt to handle the contents found by this search. BAD CODE! What if there was nothing found?

    5 - you append the just-read html (from the unknown function call) to an array as a new element. Is $data the reason for you memory overload?

     

    Since count starts at 1 and maxnumber is set to 5, you should only do this 5 times. Where is 12 coming into play as you mentioned?

  2. Yes - it will throw a 'notice' IF you have that turned on (and you should only during development!) - but it will not cause a conflict. I'll trust the manual until otherwise informed. The second call will not begin a 'new' session. And eventually (hopefully) the poster will learn how to better organize his modules and code.

  3. You are seeing all the <br> tags echoed out first because you inserted them inside an html table. You can't do that.

     

    This code:

    <td>' . $row['Plaats'] . '</td>
    </tr>
    <br> THIS IS BAD
    ';
    ; THIS IS NOT NEEDED
    }
    

     

    should be changed to remove the <br> and the EXTRA ; line.

    <td>' . $row['Plaats'] . '</td>
    </tr>
    ';
    }
    

  4. You appreciate our attempts to help you but you can't seem to answer any of our questions. Why? I asked you five question and you didn't answer any of them. You just repeated the same message. Try debugging your code by displaying some values instead of doing the redirect. See what your code is seeing instead of just assuming or wondering why it operates the way it does.

     

    That's how programmers think and do.

×
×
  • 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.