Automating CpanelUser Login with PHP

universal

Registered
Dec 13, 2002
2
0
151
Hi every one,

When I type
&http://cpanelusername:[email protected]/cpanel/& as my browser URL, I'm able to login directly w/o the http authentication window.

But why is that the following PHP header funtion is not working in the same way, the following php page when called is working fine w/o any errors but the cpanel this time is returning with a http authentication window?

header(&Location: http://cpanelusername:[email protected]/cpanel/&);


Any fault in my code ?

/Universal
 

g3b

Member
Sep 7, 2002
11
0
151
Answer for you

If you use the port number (2082) instead of the /cpanel/ subdirectory, it should work as you require. e.g.

header(&Location: http://cpanelusername:[email protected]:2082/&)

Let me know if this works better for you.

Regards,

Grant
 

Radio_Head

Well-Known Member
Verifed Vendor
Feb 15, 2002
2,051
1
343
I had the same problem .It should be a cookie problem perhaps .
Or perhaps because cpanel use a different php.ini .....