|
Could there problem be because I am using pop3 driver to access the emails. I am using the code below:
$MAILSRV="mail.somewhere.com:110/pop3/notls";
$imap = imap_open ("{".$MAILSRV."}INBOX", "someemail@somewhere.com", "password");
|
|
|
|
|
I'm surprised that works at all - POP3 and IMAP are quite different.
I don't think a POP3 server keeps any information on which messages are read however, so unless you have IMAP mailboxes configured on the server you will just get a list of all messages.
|
|
|
|
|
hi,
I am a non-technical person.A software developer of my company (Mindfire Solutions) has designed a tips section relating to PHP. There various tips are provided.U can go through them and have a look.It will solve your problem.
http://www.mindfiresolutions.com/PHP-85.php[^]
Cheers,
Eliza
Mindfire: India's Only Company to be both Apple Premier & Microsoft Gold certified.
|
|
|
|
|
|
Thanks.You are Welcome.
Cheers,
Eliza
Mindfire: India's Only Company to be both Apple Premier & Microsoft Gold certified.
|
|
|
|
|
|
|
You are Welcome!!
Cheers,
Eliza
|
|
|
|
|
I am working with Wordpress right now and it is written in PHP. Let me tell you that your information is just what I was looking for. It is quite intimidating at first, but you present the information in a way that is truly easy to follow. Thank you so much for this. I am learning so much. Deficiency Judgment
|
|
|
|
|
I am seriously considering abandoning VC++ and switching to Linux based development.
Since I have an extesive and unfinished development in VC++ I would like to pick an open IDE friendly to VC++.
I have Eclipse and Code::Block on radar.
Eclipse seems to be too universal and complex for a begginer.
I also looked at Geany and it seems to be OK as editor.
It would be nice if it integrated with IDE, but I may be ahead of myself here. ( Baby steps!)
Last question - is this OK forum to ask linux distribution specific questions? I find Linux users group too much "how to work in Linux OS" and not programming oriented.
Thanks for reading, any constructive comments are as always appreciated.
Cheers Vaclav
PS I did read the IDE thread here.
|
|
|
|
|
I don't know if it will be any help, but KDevelop is one of the main C/C++ IDE's for Linux.
Heres a screenshot of KDevelop's GUI. Click
|
|
|
|
|
hello , i have been trying to sort this out for hours , and there are probably 2000 other people who have asked this but when i try and send form results to an email adress from the local host which i set up i get this :
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\Apache2.2\htdocs\websites\test\process.php on line 6
here is my code in php.ini
[mail function]
STMP = localhost
sendmail_from = me@whatever.com
here is my code in the form process.php
<?php
$name = $_REQUEST['name'];
$message = $_REQUEST['msg'];
mail('me@whatever.com', $message,$name);
?>
i have also downloaded a SMTP piece of software to try and overcome the problem but no result yet ... Thnaks for all your help :P
|
|
|
|
|
You need to add a custom header as a fourth parameter to the mail function, to add your From header. Example:
mail('me@whatever.com', $message, $name, 'From: webmaster@example.com' . "\r\n");
Adam Maras | Software Developer
Microsoft Certified Professional Developer
|
|
|
|
|
Thanks that worked perfectly , by any chance do you know how i can fix this error ?
It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting
or the date_default_timezone_set() function. In case you used any of those methods and you are still
getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for '0.0/no DST'
instead in C:\Apache2.2\htdocs\websites\test\process.php on line 6
Thanks again
|
|
|
|
|
You shouldn't rely on the default timezone of the server. It needs to be explicitly set to the required timezone.
Eg:
date_default_timezone_set( 'Europe/London' );
So put that line before line 6, process.php.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Thanks !!! 
|
|
|
|
|
hi all,
I am having the problem with arrays in php.
I created two single dimensional array contains some data.
Now i want to compare those arrays and print the values i.e., some items which are common to printed in one color and the rest of the items in other.
Thanks in advance.
|
|
|
|
|
if both arrays are the same size...
$arr1 = array(1,2,3,4,5);
$arr2 = array('a',2,'b','c','d');
$cnt = count($arr1);
echo "<table>";
for($i=0;$i<$cnt;$i++)
{
echo "<tr";
if($arr1[$i]==$arr2[$i])
{
echo " class='match_color'>";
}
else
{
echo " class='nomatch_color'>";
}
echo "<td>".arr1[$i]."</td>";
echo "<td>".arr2[$i]."</td>";
echo "</tr>";
}
echo "</table>";
|
|
|
|
|
When is it correct to use quotes inside of array braces? For example, which is proper:
$i = '2';
print $array[$i]; // without quotes
-or-
$i = '2';
print $array["$i"]; // with quotes
Do both work the same? Or is each different in different circumstances.
Thank you.
|
|
|
|
|
David1922 wrote: Do both work the same?
Technically yes, they do work the same, but the second method is very bad practice. It dosen't serve any purpose, it just wastes processing time as the string has to be compiled to check for variables (which happens to all strings surrounded by double quotes ["]), rather than just having the variable put directly in i.e. the first method.
You should only use quotes in array braces if you have an associative key such as $array['key']; .
Or:
$key = 'key';
echo $array[ $key ];
Hope that helps.
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Hi all,
I am using multiple check boxes in my page which are generated using the loop.
Now the problem is when i select the check boxs i want the values of the selected the boxes in the another page.
How to do it ?
Remember one thing the name or id of the check boxes are same.
Thanks in advance.
|
|
|
|
|
try accessing the checkboxes like an array.
|
|
|
|
|
Hey, I was wondering how I would code, for a "Users Online Today" thingy, like the one used on IPBfree forums, for like a regular site.... well a php site. I recently created a php membership system on my site, using a tutorial. I was wondering if anyone knew how to code for it to search the Member database, to see who logged on in the 24hr period of time...
Also, along with this request... Does anyone know how to possibly use php to make user pages, of which can be edited by the user, much like the the pages from IPBfree forums.. Like being able to edit sections such as, Age, Website, Email, Interests, Location, and About Me...? I was wondering if I would be able to make that possible through PHP... Once a user Registers, their page is made, like "sitename.com/members/'username'.php" so that from every other page it has the option of "Control Panel" and through there, Edit Profile, Edit Email, Edit Password, and stuff, of which I can add at a later date, but when they click on the edit profile link, they can edit said fields. Then with this, allow for a members page, that shows a list of all the members usernames that once clicked takes the viewer to their profile, which shows said information... Please Help me, I haven't been able to find this information on other sites, I also asked in the IPBfree forums as well and they wouldn't give me any information that I could use other than it will most likely need to be used with a MYSql database. Also I have spent over 100 hrs searching for it. But whatever you can do to help, will be appreciated! Thank-You!
|
|
|
|
|
thebiostyle wrote: I was wondering if anyone knew how to code for it to search the Member database, to see who logged on in the 24hr period of time...
How do you save your user data? You didn't tell. I assume you use a MySQL-DB. Everytime a user logs in, you have to save the login-date/time into your DB. To find out who logged in during the last 24 h, you just have to select the login data where time is less then 24 hours away from now.
thebiostyle wrote: I was wondering if I would be able to make that possible through PHP...
Sure, but not with what little knowledge of PHP you seem to have. You are right, you need major help. But you won't find anybody here, who will present the whole project to you. Try to get the basics and continue from there. If you have a specific problem, then ask.
-create a MySQL-database where you store user data
-create a website in which to show the user data (user profile)
-connect to your database and fetch the appropriate user data
-fill your site with that data
-insert a save-button, to allow the user to change his entry
There are hundreds of examples how to do that. But don't just get one of them and copy them to your project. Try to understand, what has to be done to achive your goal, not just copy and paste.
I'd suggest, you get a beginner's book to start.
(I know this is not the answer you expected.)
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Well, since you've presumably used mySql to store the user details, why not add a field to the database called something like lastLoginTime.
I'd probably fill that field with the Unix time, since it's much easier to compare two integers than 2 strings.
e.g
$curLoginTime = time(); // number of seconds since Jan 1 1970
Make sure you save this data to the user's lastLoginTime mySql entry.
All you have to do then is run a query that retuns all users.
Run the time command again, subtract 24 * 60 * 60 seconds from the result, and that's the number of seconds elapsed from 1 Jan 1970 to 24 hours prior to the current time. If the user's lastLoginTime is an integer higher than this number, you just found someone that logged in in the last 24 hours.
As for the user management panel thing - that's also relatively easy. You just make sure that every piece of info on the screen you wish to edit has a corresponding field in the mysql database.
Though, I will mention a small thing that may otherwise cause frustration: The general form of the url for a user's personal page will be "sitename.com/members/filename.php?user=userName" - The reason for the difference is that you _don't_ want a new php page for each user, you want to create one page that will handle all of them, just pass the actual user as a variable to the statistics/editing page.
I'd just be inclined at this point of the learning-curve to hit google with "free forum php code" then scan the results for an example that does what you want, or uses a method of achieving something else that you can adapt to your own needs.
Failing that - I'd still use somebody else's as a starting block, just try to add new features to their code.
smithers-jones wrote: But you won't find anybody here, who will present the whole project to you
Me included. While I did indulge the previous request - That was a comparatively small one.
Smithers-jones suggests some useful tactics. Understanding code and not just copying it is perhaps the best advice one can give a fellow coder.
Good Luck!
modified on Friday, January 1, 2010 5:31 PM
|
|
|
|
|