On May 31, 2011, at 12:34 AM, Negin Nickparsa wrote:

I need to create a login page with HTTPS to yahoo
Do I have to have a valid certificate?

I have not trust certification centre, so before anything under HTTPS will be shown up, the window will come with information: valid certificate: yes,
valid domain: yes, valid authority for SSL key: no.
am I right?
<?php
//if not on HTTPS
if(empty($_SERVER['HTTPS'])) {
//build link to https page; protocol, server and current script path
$url = "Location: https://www.yahoo.com/";;
//addy querystring, if appropriate
if(count($_GET) != 0) {
$url .= "?";
foreach($_GET as $key => $value) {
$url .= "$key=$value&";
}
}
//send permanent move redirect
header($url, true, 301);
}
?>
but it goes to http://www.yahoo.com

I don't have an answer to your question, but you should look at http_build_query: http://us.php.net/manual/en/function.http-build-query.php for the last part of your code. It makes the query string safe for transmittal.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to