Jump to content

Porl123

Members
  • Posts

    239
  • Joined

  • Last visited

About Porl123

  • Birthday 03/29/1991

Profile Information

  • Gender
    Male
  • Location
    England, UK

Porl123's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Found a solution, not sure if it's the most efficient, but it works. http://php.net/manual/en/function.curl-multi-init.php#105252
  2. while($active && $mrc == CURLM_OK) { if(curl_multi_select($mh) != -1) { do { $mrc = curl_multi_exec($mh, $active); } while($mrc == CURLM_CALL_MULTI_PERFORM); } } After some more testing it seems the do..while loop is never reached as curl_multi_select($mh) always returns -1. Also the page times out because the condition in the outer while loop is always true "$active && $mrc == CURLM_OK, " although I'm really not sure why that is. Any thoughts?
  3. Hi all, I've got a relatively simple script where I'm trying to perform a multiple curl call to several pages as once. I'm running this in wamp and the cURL extension is definitely enabled and normal curl functions work fine. When I run the script below the page times out: http://pastebin.com/vxMDmnbh I suspect the timeout's being caused by this section here: $active = null; do { $mrc = curl_multi_exec($mh, $active); echo 'g'; } while($mrc == CURLM_CALL_MULTI_PERFORM); while(false && $active && $mrc == CURLM_OK) { if(curl_multi_select($mh) != -1) { do { $mrc = curl_multi_exec($mh, $active); } while($mrc == CURLM_CALL_MULTI_PERFORM); } } But I can't be sure. This is effectively the sample code given on the php.net page and it's not loading. Can anyone spot the problem? Thanks, Paul
  4. Well yeah, because the password in the database won't be encrypted. Take the md5 off for a moment.
  5. Ah I see, well add "or die(mysql_error())" at the end of your query.
  6. What error messages are you getting?
  7. Yeah, your update query updates your password to $newpass, which is the version of the password before it went through the md5. So the password stored in the database isn't encrypted.
  8. if(!md5($_POST['oldpassword']) == $passorig) { $err[]='Your password is incorrect!'; } The original password should be put through the md5 function to make the comparison.
  9. In the select queries you're referring to the table tz_mebers and in the update query you're updating tz_members.
  10. You're comparing the user inputted field with a query, you know. You need to fetch the row before you can compare its fields. $query = mysql_query("SELECT pass, email FROM tz_mebers WHERE usr=$usr"); $user = mysql_fetch_array($sql); echo 'Email: '.$user['email'].' Password: '.$user['pass'];
  11. Typically you would put the entire directory in htdocs and run the project from there. You can only preview HTML in browser, the PHP will be displayed as text. You need to have PHP installed into your environment, which XAMP does, so I'd run your PHP files from there.
  12. Have you tried putting the files in htdocs and running from that location from the browser?
  13. Yeah, perhaps a question relating to sentence structure. It's not fool proof, but it's not as innate in computers to understand.
  14. Well you could use something like cURL to read the page first, get the value of that hidden field and then just enter it into the answer, so that solution may fall over. You might want to consider storing the answer in a session instead.
×
×
  • 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.