|
|
|
(PHP) Нужна помощь по curl
|
|||
|---|---|---|---|
|
#18+
Возможно ли создать скрипт который соединяется с сайтом, там авторизуется, потом выдает 0 или 1 в зависимости от успешности авторизации. На phpclub нарвался на такой скриптик <?php // HTTP authentication $url = "http://www.example.com/protected/"; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERPWD, "myusername:mypassword"); $result = curl_exec($ch); curl_close($ch); echo $result; ?> Может я вообще ни с том направлении копаю? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 19.08.2005, 13:07 |
|
||
|
|

start [/forum/topic.php?fid=23&msg=33225586&tid=1477730]: |
0ms |
get settings: |
10ms |
get forum list: |
14ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
142ms |
get topic data: |
7ms |
get forum data: |
2ms |
get page messages: |
26ms |
get tp. blocked users: |
1ms |
| others: | 242ms |
| total: | 450ms |

| 0 / 0 |
