|
|
|
| Встретил на одном из сайтов вопрос. Есть ли у кого какие идеи по решению?
I have been using the idea below below.
//check username and password in db
//this will give me the site they are registered to
header("Location: http://www.$site_registered_to");
problem is that this will not pass the username and password to the other site.
it works if i use this
header("Location: http://www.$site_registered_to?username=$username&password=$password");
But i need to post the vars, can this be done and any ideas on how? | |
|
|
|
|
|
|
|
для: Skyonex
(10.03.2006 в 04:21)
| | Если доступа к сайту $site_registered_to нет, то проблему решить никак нельзя... | |
|
|
|
|
|
|
|
для: Skyonex
(10.03.2006 в 04:21)
| | пожно запросить страницу с этого сайта через fsocketopen а параметры username и password передать через post..
примерно это должно выглядеть так:
$f=fsocopen("$url", $errno, $errstr, 30);
............................
............................
$out="Post: /{$url?username=$username&password=$password} /HTTP1.0 /r/n";
...................................
fput($f, $out);
$cont=fread($f, 1024);
.........................
fclose($f);
.........
echo $cont;
|
| |
|
|
|
|
|
|
|
для: runtime
(10.03.2006 в 12:25)
| | Всё бы ничего, но автору, вероятно, нужно отправить ответ клиенту в браузер. Со всеми авторизациями, куками, сессиями, и прочим клиентским барахлом. Вот это выйдет врядли. Не транслировать же весь его трафик через себя. | |
|
|
|