daleader Posted September 4, 2006 Report Share Posted September 4, 2006 <?php $a = file_get_contents('http://draugiem.lv/'); preg_match_all('@(<input type="password" class="inp" name=")(.*)(" size="23" style="width: 150px;" autocomplete="off" />)@', $a, $rez);//sheit mees dabuujam password lauka name $email = "pasts"; $pass_value = "parole"; $pass_field = $rez[2][0]; $ch = curl_init(); $store = curl_setopt($ch, CURLOPT_URL, 'http://draugiem.lv'); //te notiek lapas paarlaade un mainaas password lauka name un taalaak logins nenotiek. $store = curl_setopt ($ch, CURLOPT_POST, 1); $store = curl_setopt ($ch,CURLOPT_POSTFIELDS, 'eml='.$email.'&'.$pass_field.'='.$pass_value); $store = curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); $store = curl_exec($ch); curl_close ($ch); preg_match_all('@(<div class="fbxt"><b>)(.*)(</b></div><br />)@', $store, $rez); echo $rez[0][0]; ?> ko tur vareetu liidzeet, lai tā tas nenotiktu Link to comment Share on other sites More sharing options...
bubu Posted September 4, 2006 Report Share Posted September 4, 2006 Nesapratu. Kur ir problēma? Link to comment Share on other sites More sharing options...
daleader Posted September 4, 2006 Author Report Share Posted September 4, 2006 (edited) katru reizi kā ielādējas draugiem.lv password laukam tiek dota jauna name vērtība un vecā tiek dzēsta. tāpēc nesanāk ielogoties. piem: <input type="password" class="inp" name="_77594560" size="23" style="width: 150px;" autocomplete="off" /> <input type="password" class="inp" name="_41034769" size="23" style="width: 150px;" autocomplete="off" /> un ar veco vērtību kuru ieguvām ar file_get_contents nevar ielogoties jo tāds lauks nepastāv Edited September 4, 2006 by daleader Link to comment Share on other sites More sharing options...
Roze Posted September 4, 2006 Report Share Posted September 4, 2006 Šādus skriptus nav vērts taisīt.. tiks izķerti un banoti.. Link to comment Share on other sites More sharing options...
bubu Posted September 4, 2006 Report Share Posted September 4, 2006 daleader: un kur ir problēma izparsēt ārā jauno password lauka nosaukumu? Link to comment Share on other sites More sharing options...
Vebers Posted September 5, 2006 Report Share Posted September 5, 2006 (edited) Uzraksti pareizu reg-exp izteiksmi un ai daa.. Bet kaa jau Roze teica: Šādus skriptus nav vērts taisīt.. tiks izķerti un banoti.. Edited September 5, 2006 by MakaTaNaw Link to comment Share on other sites More sharing options...
Delfins Posted September 5, 2006 Report Share Posted September 5, 2006 password lauka nosaukums mainās, tāpēc ka tu nepadod sesijas ID... (var izdarīt tikai 2 pieprasījumus - GET(forma) un uzreiz POST(to pasu formu)) bet draugiem.lv nav tā vērti, lai tērētu savu dārgo laiku... ej labāk pamācies par fsoketiem Link to comment Share on other sites More sharing options...
daleader Posted September 5, 2006 Author Report Share Posted September 5, 2006 paldies par atbildēm, būs vien jāiet jāsameklē kāda cita lapa uz kuras pamācīties. Link to comment Share on other sites More sharing options...
UTF-10 Posted September 14, 2006 Report Share Posted September 14, 2006 (edited) A kods nestrada... met ara Fatal error: Call to undefined function: curl_init() in draugiem.php on line 6 Edited September 14, 2006 by UTF-10 Link to comment Share on other sites More sharing options...
v3rb0 Posted September 14, 2006 Report Share Posted September 14, 2006 RequirementsIn order to use PHP's CURL functions you need to install the libcurl package... Installation To use PHP's CURL support you must also compile PHP --with-curl[=DIR]... http://lv2.php.net/manual/en/ref.curl.php Link to comment Share on other sites More sharing options...
Orion7 Posted September 14, 2006 Report Share Posted September 14, 2006 Mjā, nez kur mans iepriekšējais posts palika. ;) UTF-10 atkomentē šo te rindiņu: extension=php_curl.dll php.ini failā. Link to comment Share on other sites More sharing options...
Recommended Posts