Jump to content

ibinod

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by ibinod

  1. Hi, i am trying to make a simple code that can submit content automatically using curl i have the following code This is to login to the site which works perfectly $curl_connection = curl_init("http://www.familyfriendsphotos.com/login.php"); curl_setopt($curl_connection, CURLOPT_CONNECTTIMEOUT, 300); curl_setopt($curl_connection, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($curl_connection, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($curl_connection, CURLOPT_POST, 1); curl_setopt($curl_connection, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($curl_connection, CURLOPT_AUTOREFERER, true); curl_setopt($curl_connection, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_connection, CURLOPT_TIMEOUT, 10); curl_setopt($curl_connection, CURLOPT_COOKIEJAR, ‘cookie.txt’); curl_setopt($curl_connection, CURLOPT_COOKIEFILE, ‘cookie.txt’); $post_data['uname'] = $dir['user']; $post_data['pswd'] = $dir['pass']; $post_data['Submit']="Login"; foreach ( $post_data as $key => $value) { //echo ("Key:".$key."=>".$value); $post_items[] = $key."=".$value; } $post_string = implode ("&", $post_items); //echo $post_string; curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string); $result = curl_exec($curl_connection); unset($post_data); and to submit the article i have the following code curl_setopt($curl_connection, CURLOPT_URL, 'http://www.familyfriendsphotos.com/submitart.php'); $post_data['author'] = $article['author']; $post_data['parentId'] = $article['cat']; $post_data['f_arttitle'] = $article['title']; $post_data['f_artsummary'] = $article['short_desc']; $post_data['f_artbody'] = $article['article']; $post_data['f_artres'] = $article['resource']; $post_data['f_artkey'] = $article['keywords']; $post_data['key']="avachars_key"; $post_data['submit'] = "Submit"; foreach ( $post_data as $key => $value) { $post_items[] = $key."=".$value; } $post_string = implode ("&", $post_items); curl_setopt($curl_connection, CURLOPT_POSTFIELDS, $post_string); $result = curl_exec($curl_connection); echo ($result); curl_close($curl_connection); But i get invalid http request like this Please tell me what should i do to fix this
  2. it has been a quite long that i have been encrypting password this way sha1(md5(md5(sha1(md5(sha1(sha1(md5($pass)))))))) it's because it's real easy to decrypt md5 and sha1 simple hashes infact i am inserting passwords on my database like this mysql_real_escape_string(sha1(md5(md5(sha1(md5(sha1(sha1(md5($pass))))))))), what do you guys think about this is it a better solution than md5($pass) || sha1($pass) or i am completely idiot doing that or are there better secure way for password encryption pls give me some suggestion thanks a lot
×
×
  • 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.