Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 11 of 11
  1. #1
    Member
    Join Date
    Jan 2006
    Posts
    16

    Default Adding webmail to your site

    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.
    Attached Files

  2. #2
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    Quote Originally Posted by nileshwarade
    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.

    Rename it to cplogin.php or any name you prefer.

    Edit Login configuration to look like this:
    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;
    ?>
    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.

    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.
    Code:
    <?php
    print "<input type=hidden name=failurl value=\"http://" .  $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?failed=1\">";
    ?>
    Remove this from the bottom of the script (you don't need your clients seeing it)
    Code:
    <br>
    <a href="cpanel-login.phps">Source</a><br>
    Note: This examples requires cPanel 9.4.1 or later!
    Then upload it to your web site.

    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.

  3. #3
    Member
    Join Date
    Jan 2006
    Posts
    16

    Unhappy call php scritp in html

    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...........

  4. #4
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    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


  5. #5
    Member Murtaza_t's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    471

    Default

    A file with .php extension will never open in FP.

  6. #6
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    Quote Originally Posted by Murtaza_t
    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.

    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:
    Code:
    <HTML>
    <HEAD>
    <title>Welcome <? echo $SERVER_NAME; ?></title>
    </HEAD>
    <body>
    Welcome <b><? echo $SERVER_NAME; ?></b>
    </body>
    </html>
    Save this file as index.php and then test open it in FP.

    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 ;)

  7. #7
    Member
    Join Date
    Jan 2006
    Posts
    16

    Question I done the webmail login in my site but some problem

    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.
    Attached Thumbnails Attached Thumbnails Adding webmail to your site-login.jpg  
    Attached Files

  8. #8
    Member
    Join Date
    Feb 2004
    Posts
    469

    Default

    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.

  9. #9
    Member Murtaza_t's Avatar
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    471

    Talking

    Quote Originally Posted by Izzee
    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.

    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:
    Code:
    <HTML>
    <HEAD>
    <title>Welcome <? echo $SERVER_NAME; ?></title>
    </HEAD>
    <body>
    Welcome <b><? echo $SERVER_NAME; ?></b>
    </body>
    </html>
    Save this file as index.php and then test open it in FP.

    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.

    Please don't take me wrong,, I never ment to say that your reply was misleading...but this one would realy help ......
    Well I tried your method and that works
    And yes... you ARE more familiar with FP now...LOL

  10. #10
    Member
    Join Date
    May 2005
    Posts
    14

    Default cPanel-Horde Bridge

    cPanel-Horde Bridge here http://www.nnexxezz.com/hbridge works great. thanks for the suggestion.

  11. #11
    Member
    Join Date
    Jan 2006
    Posts
    16

    Unhappy setting.php in horde/hbridge

    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.????????????????????

Similar Threads & Tags
Similar threads

  1. adding web site builder
    By secureplus1 in forum New User Questions
    Replies: 1
    Last Post: 02-03-2009, 02:15 PM
  2. Adding a cPanel/WHM/WebMail login box to your site.
    By cpanelnick in forum cPanel and WHM Discussions
    Replies: 178
    Last Post: 05-08-2008, 10:10 PM
  3. Need help on adding banners to customer site
    By flavesta in forum cPanel and WHM Discussions
    Replies: 21
    Last Post: 05-10-2006, 01:05 PM
  4. Adding a new webmail client
    By dkuntz in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-18-2005, 01:19 PM
  5. Adding an IP based site
    By annamarie in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-02-2003, 07:44 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube