Page 1 of 1

safe redirection - help

Posted: Sun Sep 24, 2006 10:09 am
by arukomp
Hello,

I have a problem. I want to redirect to page without anyone being able to catch url in any way (source code, adress bar...).

I have an url:

https://www.e-gold.com/acct/confirm.asp ... E_CHANGE=y

As you see, this is E-Gold's automatic payment url. Account password is visible to anyone who catches this url. I don't want this to happen. This is also SSL secure server. Also, it would be a lot better if page won't show in browser. I just want to execute this url to get payment processed and then get back to my homepage or other page...

cURL is disabled in my server, so i can't use it (function doesn't exist). :(

Any help will be appreciated.

Thanks :)

Posted: Sun Sep 24, 2006 10:19 am
by feyd
Since cURL isn't available, fsockopen() or a class that uses fsockopen() are your only choices.

Posted: Sun Sep 24, 2006 10:32 am
by arukomp
Tried, I'm using ssl:// protocol instead of https:// and port 443 to connect with fsockopen() .

This doesn't work. There is error i get:

Code: Select all

Warning: fsockopen(): php_network_getaddresses: gethostbyname failed in C:\Program Files\xampp\htdocs\cycler\payment.php on line 23

Warning: fsockopen(): unable to connect to www.e-gold.com/acct/confirm.asp?AccountID=123456&PassPhrase=123456&Payee_Account=1422456&Amount=10&PAY_IN=1&WORTH_OF=Gold&Memo=Bonus to Arunas&IGNORE_RATE_CHANGE=y:443 in C:\Program Files\xampp\htdocs\cycler\payment.php on line 23
i use fsockopen() like this:

Code: Select all

fsockopen($url,443);
$url is that website to which i want to connect. there is ssl:// protocol instead of https://

Thanks

Posted: Sun Sep 24, 2006 10:38 am
by feyd
Notice how :443 is at the end there? That's a hint at what fsockopen() wants to receive: ssl://domain.

Then you write out the header requests needed to get to the path and data.

Posted: Sun Sep 24, 2006 10:50 am
by arukomp
um... thanks very much, but how to write header requests?

Posted: Sun Sep 24, 2006 11:55 am
by arukomp
found it....

Now everything works.

Thanks :D