473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

I need script in php for web mail log in

I need script in php for web mail log in to add in my any web page

www.hazratsultanbahu.com/webmail www.hazratsultanbahu.com/webmail

Can you help me in php

Yours truly,
M Farooq
Webmaster
www.hazratsultanbahu.com
Dec 4 '06 #1
5 4174
ronverdonk
4,258 Expert 4TB
Now this is not a coding-on-demand shop! This forum's goal is to help php programmers having problems with the code they have developed or getting it installed and running.

If you want ready-made code, I advise you to go to a commercial webdeveloper, who will be happy to oblige.
If that is not what you are looking for, show the code you have developed until now and we can see how we can help you.

Ronald :cool:
Dec 4 '06 #2
Ok
Many thanks for your info for my understanding

Please note I have developed two files code you file links as fallows:
www.hazratsultanbahu.com/loginmail/index.php
www.hazratsultanbahu.com/loginmail/logway.php

When I try to log in then following error coming on as fallows:
Fatal error: Call to a member function on a non-object in /home/hazratsu/public_html/loginmail/index.php on line 58

Please help how I problem can be solved?
You can send me mail to: atco@hazratsultanbahu.com

File no one index.php code as fallows:
<?php
/*
This is the example script for cpmail class
*/

?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Web Mail Log in</title>
</head>

<body>

<p><b><font size="5">Web Mail Log in</font></b></p>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

<table border="0" width="52%" style="border-collapse: collapse">
<tr>
<td colspan="2">
<p align="left"><b>login Email Account</b></td>
</tr>
<tr>
<td width="78">
<p align="right">Username:</td>
<td><input type="text" name="euser" size="20"></td>
</tr>
<tr>
<td width="78">
<p align="right">Password:</td>
<td><input type="password" name="epass" size="20"></td>
</tr>
<tr>
<td width="78">&nbsp;</td>
<td><input type="submit" value="login Account" name="login"></td>
</tr>
</table>
</form>
<p>&nbsp;</p>
<?php
if(isset($_POST['login'])){

//include class file
require_once('logway.php');

/*
instanceiate class & pass two arguments cpanelusername, cpanelpassword,yourdomainname,cpanelskin
See following URL to know how to determine your cPanel skin
http://www.zubrag.com/articles/deter...panel-skin.php
if you don't pass cpanelskin argument, default will be x
*/

//call login function and you have to pass two arguments as follows:
//emailid, password

echo $cpanel->login($_POST['euser'],$_POST['epass']);
}
?>
</body>

</html>

file logway.php codes as fallows:

<?php
/*
This class is an extension of script made by www.zubrag.com. You can access the original link from here
http://www.zubrag.com/scripts/cpanel...il-account.php

Class Name: cpmail
Clas Title: cPanel Mail Accounts Creator
Purpose: login cPanel email account without loggin in to cPanel.
Version: 1.0
Author: Md. Zakir Hossain (Raju)
URL: http://www.rajuru.xenexbd.com

Company: Xenex Web Solutions
URL: http://www.xenexbd.com

License: GPL
You can freely use, modify, distribute this script. But a credit line is appreciated.

Installation:
see example.php for details

*/

//definding main class
class cpmail{
//declare public variables
var $cpdomain; // hazratsultanbahu.com:2095
var $cpskin; // x

//defining login
function cpmail($cpdomain,$cpskin='x'){
$this->cpdomain=$cpdomain;
$this->cpskin=$cpskin;
// See following URL to know how to determine your cPanel skin
// http://www.zubrag.com/articles/deter...panel-skin.php
}

//now login email account, function takes two arguments
/*
$euser = email id
$epass = email password
*/
function login($euser,$epass){
$path="http://".$euser.":".$epass."@".$this->cpdomain.":2095/frontend/";
$f = fopen($path,"r");
if (!$f) {
return('Cannot login email account. Possible reasons: "fopen" Wrong user name or password Try again!, or may account not exists');
}

//return success

}
}

?>
Enclose your code in code, php or html tags! It is absolutely unreadable! - Read the Posting Guidelines before you show any code in this forum! Ronald :cool:
Dec 4 '06 #3
Could you format your code correctly? Then I could probably figure it out for you. Please use the REPLY GUIDELINES (to the right of the reply form) when you enter your comments, and it will tell you how to submit the PHP code.

Thanks,
Sean
Dec 4 '06 #4
You can create your e-mail account for try with this link:

And you can log in with:
www.hazratsultanbahu.com/webmail ]www.mail.hazratsultanbahu.com/cracm.php

PHP code page which are not working as fallows to create web mail login page as fallows:

[PHP].
<?php
/*
This is the example script for cpmail class
*/

?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>cPanel Email Creator</title>
</head>

<body>

<p><b><font size="5">Cpanel Email Creator</font></b></p>
<form method="POST" action="<?php echo $_SERVER['PHP_SELF']; ?>">

<table border="0" width="52%" style="border-collapse: collapse">
<tr>
<td colspan="2">
<p align="left"><b>Create Email Accounts</b></td>
</tr>
<tr>
<td width="78">
<p align="right">Username:</td>
<td><input type="text" name="user" size="20"></td>
</tr>
<tr>
<td width="78">
<p align="right">Password:</td>
<td><input type="password" name="pass" size="20"></td>
</tr>
<tr>
<td width="78">&nbsp;</td>
<td><input type="submit" value="login webmail" name="login"></td>
</tr>
</table>
</form>
<?php

#your domain or ip
$domain = "hazratsultanbahu.com";

if(!$_POST['login']) {
exit;
}

$user = $_POST['user'];
$pass = $_POST['pass'];
$port = $_POST['port'];

$port == "2083" || $port == "2096" ? $pre = "https://" : $pre = "http://";
$port == "2095" || $port == "2096" && !eregi("@", $user) ? $user = "".$user."@".$domain."" : $user = $user;

?>
<body onLoad="setTimeout('document.forms[0].submit();',10)">
<form action="<?php echo "".$pre."".$domain.":".$port."/login/"; ?>" method="post">
<input type="hidden" name="user" value="<?php echo $user; ?>">
<input type="hidden" name="pass" value="<?php echo $pass; ?>">
?>
</body>

</html>
[/PHP]>
Dec 5 '06 #5
halles
7
I need script in php for web mail log in to add in my any web page

www.hazratsultanbahu.com/webmail www.hazratsultanbahu.com/webmail

Can you help me in php

Yours truly,
M Farooq
Webmaster
www.hazratsultanbahu.com
Try this website: http://troutworks.com/phpbook/
Dec 10 '06 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: DonLi | last post by:
Hello, I tested a PHP script with a FORM of 2 element and it delivered the mail but then when I added more FORM elements, it failed to deliver. Following is the content of the PHP script that...
9
by: Jofio | last post by:
I am just learning PHP. I just tried coding a php script which I saved as mail.php ---------------------------- <? $name=$_POST; $email=$_POST; $comments=$_POST;
0
by: James Hong | last post by:
Help please, I try to sending an email from my html page using the java applet. but it give error on most of the PC only very few work, what is the error i make the java applet show as below ...
5
by: Bernard | last post by:
Hi, I have a problem with a CGI script (Perl) on a Win2000 server. The script is for sending E-cards and was written by Jason Maloney:...
4
by: shror | last post by:
dear all, i have started learning php 2 weeks ago and i have wrote my first script for mail sender and the script takes all my data and move to the thanks page but the problem is that the mails...
20
by: Pete Marsh | last post by:
Wondering if anyone can see an error with this script. I get a server configuration error. THat could mean a module is not being loaded, but maybe there's a syntax error here, can anyone spot it?...
0
by: josh | last post by:
HI I'm new to .asp and vbscript and I need to validate a form before it is emailed to me. I don't really understand what email functionality I have on the server (and the tech support might get...
4
by: thanos | last post by:
Hello, I'm relatively new to PHP so I found this free contact us script on the net that i was going to use for my Contact Us php page. Its works pretty good except for error handling. I was...
11
by: shror | last post by:
Hi every body, Please I need your help solving my php mail() function problem that the code is appearing in the view source and I dont know whats the problem where I am using another page tto test...
3
by: vijayarl | last post by:
Hi all, i have perl script, which is used to send mail. its a command line utility. if we run this perl script in command line by passing all it's required arguments, it works very well.there no...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.