|
|
|
(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?desktop=1&fid=23&tid=1477730]: |
0ms |
get settings: |
4ms |
get forum list: |
10ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
24ms |
get topic data: |
6ms |
get forum data: |
1ms |
get page messages: |
23ms |
get tp. blocked users: |
1ms |
| others: | 203ms |
| total: | 276ms |

| 0 / 0 |
