Hi friends, please can somebody tell me how to add webmail login to site. o know thread allrady posted in 2004. i was gone through that. there is php script. i attact that php script. please tell me how to add. or procedure to do the same.
Hi friends, please can somebody tell me how to add webmail login to site. o know thread allrady posted in 2004. i was gone through that. there is php script. i attact that php script. please tell me how to add. or procedure to do the same.
Extract the file from the zip.Originally Posted by nileshwarade
Rename it to cplogin.php or any name you prefer.
Edit Login configuration to look like this:
Change the #Webmail to #Secure Webmail, if you prefer, by adding a # infront of the $protocal and $port of #Webmail and removing the # in front of the #$protocal and #$port of #Secure Webmail.Code:#Login Configuration #cPanel #$protocol = 'http'; #$port = 2082; #Secure cPanel #$protocol = 'https'; #$port = 2083; #WHM #$protocol = 'http'; #$port = 2086; #Secure WHM #$protocol = 'https'; #$port = 2087; #Webmail $protocol = 'http'; $port = 2095; #Secure Webmail #$protocol = 'https'; #$port = 2096; ?>
Edit and put in your site details in the html part [Web Hosting Company Name Here]
Edit this "http://" to show your preferred page that will show on an error.
It can be the login script page so it returns to the log in page again on an error or it can be a seperate error page with a link back to the login script page.Remove this from the bottom of the script (you don't need your clients seeing it)Code:<?php print "<input type=hidden name=failurl value=\"http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">"; ?>
Then upload it to your web site.Code:<br> <a href="cpanel-login.phps">Source</a><br> Note: This examples requires cPanel 9.4.1 or later!
Create a link in the web page you want to call the login script.
Click on the link you created and it should load the login in page in your browser.
You can dress it up with addition html of your choice like centering background images etc to match your web site theme.
There are also ways to include the code in the zip file into a web page.
Copy and paste the code into a page where you want to show the cPanel log in info.
Do the edits above.
This will then be a part of your web site theme without the need for a seperate login page.
Remeber to save the page with a php extension not a html (htm) extension as now it will need to be parsed by your server as a php script file. ie index.php not index.html
HTH
Just to add.
If you want to be really smart then you can have login boxes on your web pages for all the cPanel pages (cPanel/WHM/Webmail, secure or not) by pasting in a seperate occurance of the script, using the above method, but change the 'Login Configuration' for each seperate login box required.
![]()
Last edited by Izzee; 01-05-2006 at 07:08 PM. Reason: Added more info.
Thanks for help i done it. but can u explan me after creating php cript in frontpage how can we call the php script in html page....Soryyyyyyyy i am biginer...........![]()
![]()
Not familiar with FrontPage. So I am taking a guess.
Do you mean how do you preview your php script in FP?
To preview a php script it has to be parsed by a web server.
So you will have to upload your file(s) to the server and preview them there.
Make edits again in FP then upload and preview again. There is no way to preview php scripts in FP.
Remember if your file has a mix of html and php the file must have an extension of .php
![]()
A file with .php extension will never open in FP.
I believe my reply was more accurate and less misleading, because from the desktop, you can File/Open.. any.php with mixed html/php or php only coded files in FP2003 but it won't preview or show (parse) the php code in wysiwyg mode. It will show the php code (text) in the Code tab for editing.Originally Posted by Murtaza_t
Php encoded only files open in code edit mode only.
Test it by opening phpinfo.php using File/Open.. in FP
Test it by right mouse click on any html/php or php only file in a windows folder. If needed right click and select Open with...
Test it with any html/php coded mixed file like this test file:Save this file as index.php and then test open it in FP.Code:<HTML> <HEAD> <title>Welcome <? echo $SERVER_NAME; ?></title> </HEAD> <body> Welcome <b><? echo $SERVER_NAME; ?></b> </body> </html>
All these methods will open any file with php extension in FP from the desktop for editing then follow my edit/upload instructions above.
I am now a much more familiar with FrontPage.
![]()
Last edited by Izzee; 01-06-2006 at 06:41 PM. Reason: Made the English easier to understand ;)
Hi friends, i done the change as per explain, it going to straight my webmail but before going to direct login once again login box is apperaring as attached in photo. how can i avoid that login box after login through webpage login.
i attached my webmaillogin.php file with this. and relogin window.
please tell me what is the correction to avoid relogin window as shown in photo.
I copied and pasted your script to a file on a server of mine. It loaded straight into Hoarde Web Mail without any problems.
If you would like to PM me I can give you the address so you can confirm for yourself that your script is, indeed, working on a test account I set up.
Just to add. I changed passwords to check it was not a stored password issue and yes after changing the password I was presented with the login box like in your attachment.
I entered my login details in the boxes and was then given the Webmail login screen. I logged in using those login boxes and was sent to the Web Mail interface with no problems but too many logins (3 now).
So now, I reloaded your form again on my test account and entered the very same user/pass as above and was taken to the Web Mail Client Horde without having to enter my user/pass again. Not sure about this behaviour unless it is cookie related or some other browser behavior.
More added. It is indeed a cookie issue. Once the cookie is stored in your browser you will be able to login straight form this form with no problems at all. I just tested it with no cookies allowed then with allow session cookies and allow all cookies and with session and all cookies it worked perfectly.
Some wise old coder (not me) might be able to come up with a piece of code that will overcome the cookie issue. Or there may be a tweak in WHM somewhere for it that someone may point out for you.
Another piece added. I just came accross this link on a post in these forums (can't recall the postee) but looks very interesting and might be an alternative to this script if you are using Horde as your Web Mail Client.
Its called cPanel-Horde Bridge and the link:
http://www.nnexxezz.com/hbridge
![]()
Last edited by Izzee; 01-06-2006 at 09:46 PM. Reason: Added more test information.
Please don't take me wrong,, I never ment to say that your reply was misleading...but this one would realy help ......Originally Posted by Izzee
Well I tried your method and that works![]()
And yes... you ARE more familiar with FP now...LOL![]()
cPanel-Horde Bridge here http://www.nnexxezz.com/hbridge works great. thanks for the suggestion.
I friend,
I downloaded the horde bride. as per installation file, i seen the setting.php but when i open that file nothing is there. could you help me what is that file and the sample or your setting.php file means i can use it for mine domain. please give me information how do you used that horde bridge.????????????????????