|
|
|
Как установить Referer для запроса GET?
|
|||
|---|---|---|---|
|
#18+
ЗАпрос ГЕТ, как известно, состоит из строки УРЛ и параметров=значениеъ Нужно установить свойство соединения Реферер. Делаю так: String data = "http://www.url.ru/search?ps=123"; URL url = new URL(data); URLConnection conn = url.openConnection(); conn.setDoInput(true); conn.setDoOutput(true); conn.setRequestProperty("User-Agent", "Mozilla/4.0"); conn.setRequestProperty("Referer", "http://www.xxx.ru"); OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream()); wr.write(data); wr.flush(); На сервере читаю нужные свойство Referer и Юзер Агент - NULL Если делать POST посылки, то свойства устанавливаются. Как установить для ГЕТ??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 03.03.2005, 11:44 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=32943233&tid=2152882]: |
0ms |
get settings: |
8ms |
get forum list: |
14ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
145ms |
get topic data: |
8ms |
get forum data: |
2ms |
get page messages: |
32ms |
get tp. blocked users: |
1ms |
| others: | 214ms |
| total: | 428ms |

| 0 / 0 |
