Jump to content

owner

Members
  • Posts

    71
  • Joined

  • Last visited

    Never

Contact Methods

  • MSN
    ottcommunity@hotmail.com

Profile Information

  • Gender
    Not Telling

owner's Achievements

Member

Member (2/5)

0

Reputation

  1. owner

    Timezones

    So you have to use the names, you cannot use an offset to set the default timezone?
  2. Hello, I am a bit confused on how I want to go about developing my application. I see PHP is now moving towards dates using a Country/City format of dates. My question is how is everyone going about making simple timezone selectors (Like selecting the date/time on Windows) on their web applications? I really don't want to display a list of every city from America as there are a ton just in that category. Then I thought, we can calculate the time using an offset... Well php doesn't really have a function to set the time via an integral offset. So my question is... What is the best way to take a stab at this? The only way I can think of this is to make a list of the timezones, have an offset such as +1, +2, +3.... and then have an array that links the offset to the Country/City date format and then use that to set the default timezone lol Thanks in advance! Owner
  3. I just setup virtual FTP users on my server and now the permissions are screwed up so php/apache can no longer save/edit my files. Which usergroup should I add them to? Thanks, owner
  4. Hello, I am trying to install some of the PEAR mail packages but am not having much luck. First I installed pear and have configured it. I followed: http://pear.php.net/manual/en/installation.checking.php and I get bool(true) when running the test to check if pear is installed correctly. Now when I try to use this sample php script: <?php include('Mail.php'); $recipients = 'joe@example.com'; $headers['From'] = 'richard@example.com'; $headers['To'] = 'joe@example.com'; $headers['Subject'] = 'Test message'; $body = 'Test message'; $params['sendmail_path'] = '/usr/lib/sendmail'; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('sendmail', $params); $mail_object->send($recipients, $headers, $body); ?> I get these errors: Warning: Mail_smtp::include_once(Net/SMTP.php) [mail-smtp.include-once]: failed to open stream: No such file or directory in /var/www/************/******/testMail/Mail/smtp.php on line 348 Warning: Mail_smtp::include_once() [function.include]: Failed opening 'Net/SMTP.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/************/******/testMail/Mail/smtp.php on line 348 Fatal error: Class 'Net_SMTP' not found in /var/www/************/******/testMail/Mail/smtp.php on line 349 If I download the pear package manually and throw the files in the same directory(the testMail directory), I get the same errors as well. Here is a list of the pear packages it says I have installed. I am trying to install these on Debian Lenny. Thanks, owner
  5. Do you have any examples? That is what I am stuck on
  6. I am not concerned with the database side of this to turn on/off things. I am concerned about how to make my application logical. I want each section of the site in its own class rather than each section of my site in one huge file. So I need some sort of way to figure out what file needs to be pulled to bring up that information rather than one file that pulls up everything. Basically, I need some sort of controller that controls what needs to be loaded and how it loads. I know I do not make much sense but I am a bit lost too lol owner
  7. I think I am looking for something more automatized? If I recall, I have seen some scripts online where you can store each page in its own file (class?) and based on the name of the file/class it is auto loaded. I would like to make this faster/easier to add/remove modules from my site. Any ideas are appreciated owner
  8. Hello, I am working on my own little project but it seems to be getting consistently messier. Right now, I have one file with a few classes in it. Each class is its own thing. database class for database, sessions for sessions, etc. My main class that is executed consists of a switch that gets what page the user is on and then calls the appropriate function in my main file. For example here is the layout of my script. file.php $page = new page(); echo $page->runApp(); class run{ function construct(){ } function runApp(){ switch($event){ case 'doSomething': $this->doSomething(); break; default: $this->doSomething(); break; } function doSomething(){ //Code } } } class database{ //Stuff } class session{ //stuff } So having one big file with everything in it is messy and a giant bloated file. I would like to move to something that is a bit more organized/logical and could be expanded easier. Could someone please point me in a direction to go? Thanks in advance, owner
  9. Hello, I am able to send/receive email fine with my script, but I am having problems processing an email when one is received. Right now when I receive an email from some people where the email is in text/plain it is really easy to process via matching a few keywords. However, if I get an email from outlook that is whole different story My goal is to figure out how to make a function grab key things out of the email regardless of which mail client the user uses (Sender, Date, Body, etc). If the user sends a html email, I would like to have it filter both so you can see both the html version and plaintext version. Does php have any built in functions or will I have to use a lot of regex and explode? Here is an example of what a "simple" outlook email looks like: ------=_NextPart_000_0009_01CAD1EE.8055F8E0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" = xmlns=3D"http://www.w3.org/TR/REC-html40">HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii">(filtered medium)">vlink=3Dpurple> style=3D'color:#1F497D'>test class=3DMsoNormal>style=3D'font-size:26.0pt;color:red'>123425634567p> 1.0pt;padding:3.0pt 0in 0in 0in'> style=3D'font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:= = ***** [mailto:*****@*******.com] Sent: Thursday, = April 01, 2010 10:07 PM To: = *****@*******.com Subject: = test class=3DMsoNormal> Test from = outlook! ------=_NextPart_000_0009_01CAD1EE.8055F8E0-- Best Regards, owner
  10. owner

    Storing Dates

    Hello, I am working on a calendar application. I was wondering what the best wayto store dates for it would be. Is there even a way to have mySQL select a date in the form of the unix timestamp where the month = x or the day = x? I have always just stored them using a unix timestamp with the time() function from php. Any suggestions would be greatly appreciated. Thanks! owner
  11. owner

    Insert next id

    Is there a way to copy the value from an autoincrementing column to the second column without the need of the second query?
  12. Hello, I am in need of a column where the numbers should be auto incremented if left null, but also allow for duplicate numbers if specified. Is this possible? If not, what would be the best way to go about it? Right now the only way I know I could achieve this is to grab the last inserted id from the last query and then make a second query to update the column of the first one with the same id. Thanks in advance! owner
  13. I am parsing a raw email with a php script (piping) but am having some troubles. I am having a heck of a time trying to extract the body from the message since each mail client sends them just a tad different. Is there an alternative to imap commands where instead of having to login to the account and specify the id; you can just feed the email directly to the function such as imap_body? Thanks in advance, owner
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.