|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP & cURL
Hallo,
i have this code: set_time_limit(0); $cURL = curl_init(); curl_setopt($cURL, CURLOPT_URL, "https://acc.acme.lt/indexas.php?username=xxxxx&password=xxxxx"); curl_setopt($cURL, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($cURL, CURLOPT_HEADER, 1); curl_setopt($cURL, CURLOPT_FAILONERROR, 1); curl_setopt($cURL, CURLOPT_REFERER, "https://acc.acme.lt/indexas.php"); curl_setopt($cURL, CURLOPT_RETURNTRANSFER, 1); $strContent = curl_exec($cURL); echo $strContent; curl_close($cURL); --------------------- it returns the login box with note that the password or login was wrong?! if i try with CURL_POST...&POSTVARS it returns just login box without any errors. The browser sets cookie whit sid, i can see this in the output of CURL_HEADER, if i do copy & paste into browser, its OK , i get loged in.... but why this pease of code does not return me HTML code, which im getting when im loged in?!! Thanx (-: |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > PHP & cURL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|