Jump to content

coldfission

Members
  • Posts

    47
  • Joined

  • Last visited

    Never

Everything posted by coldfission

  1. pinging example.com from example.com gives my Internet IP. not my local IP or 127.0.0.1 is that a good thing?
  2. I have worked with two linux servers now that will not send email to itself. When we test programs, we like to send email to ourselves to get test content, but it always fails. for example: i send email with sendmail from server: example.com to email address: test@example.com. No email is ever received when i try Any help with this?
  3. I need to write a program that will take our inventory and find out the predicted date when we will reach quantity = 0 The only way i have decided to do this is to take our "Inventory Changes" (date and quantity at that time) and make a graph of it. Then, find the best fit line (quadratic would be nice but linear works) of that graph. Then, i can find when that best fit line reaches zero and find out what the date is at that point. That will be our predicted quantity = 0 date. Are there any tools already made for php that will find a best fit line? Is there another way to predict this without finding the best fit line?
  4. if ($key = array_search($sku,$inventory_sku)) { $inventory_q[$key] = $inventory_q[$key] + $quantity; } else { $inventory_q[$inv_count] = $quantity; $inventory_sku[$inv_count] = $sku; $inv_count++; } What if the $key = 0? That tells the IF statement that it is false and, in my case, will insert a new record when i don't want it to. How do i solve this problem? thanks
  5. it would be nice if i was to store each picture filename in a database somehow, but i don't really want to do that. I want the customer to be able to just upload the picture to the directory and it shows up in the gallery automatically.
  6. I am trying to automate a customer's photo gallery. directury structure: pictures/01 - gallery 1 pictures/02 - gallery 2 pictures/03 - gallery 3 I want to keep my code flexible so i can expand to more galleries in the future. The gallery page will be a paginated list of ALL pictures no matter folder/gallery they are in. I want each folder to be organized in descending order, but array_merge (?) them in ascending order. This gallery is just a listing of thumbnails that link to the full picture. Now that i have split up the pictures into multiple folders, i have to include which folder that picture is in in the array. I am having trouble with the array structures. Where do i put the folder variable in the array? What would my array structure look like? I'm not very good at working with arrays :'( thanks
  7. wow what a stupid error. i didn't even think of that. thanks
  8. I am sending through SMTP: localhost with no SMTP authentication Any email will send except when the recipient has an email with one of our hosted domains. We setup our MX records exactly as google apps told us to (because we use the google email app) http://www.google.com/support/a/bin/answer.py?hl=en&answer=33352
  9. The code below is supposed to send each recipient a different email body, but the same email body from the first item is being sent to everybody in the list. How do i get the body of the email to be reset for each email? $query = "SELECT orders_id, customers_name, customers_email_address FROM orders WHERE date_purchased LIKE '%$past_date%' AND orders_status=3"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); require_once "phpmailer/class.phpmailer.php"; $mail = new PHPMailer(); $mail->IsSMTP(); // telling the class to use SMTP $mail->IsHTML(true); $mail->Host = "localhost.localdomain"; // SMTP server $mail->From = "donotreply@tackwholesale.com"; $mail->FromName = "TackWholesale.com"; $mail->AddReplyTo("tackman@tackwholesale.com", "Tackwholesale.com"); $mail->Subject = "Review your Purchased Items and take our Survey"; while ($row = mysql_fetch_array($result)) { $orders_id = $row['orders_id']; $enc_orders_id = ($orders_id*897)-411; $customers_email_address = $row['customers_email_address']; $customers_name = $row['customers_name']; $customers_name = explode(" ",$customers_name); $customers_name = $customers_name[0]; $feedback_email = str_replace('past_date', $past_date, $feedback_email); $feedback_email = str_replace('customers_name', $customers_name, $feedback_email); $feedback_email = str_replace('enc_orders_id', $enc_orders_id, $feedback_email); $mail->Body = $feedback_email; $mail->AddAddress($customers_email_address); if(!$mail->Send()) { echo "error"; } $mail->ClearAddresses(); }
  10. I am not sure where our problem is, but i think Apache has something to do with it. We have multiple websites hosted through our Apache server on a GoDaddy Dedicated server. Every time i send an email (doesn't matter how i send it) to an email address that contains the domain that we host, it will not send. I believe it is trying to send an inbound message to itself and not sending externally. We have our email service at another location, so it needs to send externally just like any other email would. Ex: we host somewebsite.com I try to email me@somewebsite.com and it fails What do i have to change to get these emails working?
  11. This code will loop through the pages array and send them to the iframe. Once the page is loaded, it continues onto the next page source. This is similar to what i want, But I don't want the page to reload to the next one until the user reaches a certain point on that page source. This is because each individual page prompts the user to enter information. After the user enters their information, i want it to continue on to the next page source. How do i do this? <html> <head> <script type="text/javascript"> var pages = []; pages[0] = "http://www.blahblah.com/blah"; pages[1] = "http://www.blahblah.com/blahblah"; function updateFrame() { // get the frame var frame = document.getElementById("loopingFrame"); if(!pages[frame.pageIndex]) { // first iteration -- initialize the properties frame.pageIndex = 0; frame.count = 1; } else if(pages.length <= (parseInt(frame.pageIndex)+1)) { frame.pageIndex = 0; // we've gone through all the pages this time, increment count frame.count++; } else { // no need for a new number, just a new base page frame.pageIndex++; } var pageIndex = frame.pageIndex; var i = frame.count; frame.src = pages[pageIndex] + i; } </script> </head> <body> <iframe id="loopingFrame" src="http://www.blahblah.com/blah" onload="updateFrame();"> </iframe> </body> </html>
  12. SELECT orders.orders_id AS ID, last_modified AS modified, customers_city AS city, customers_state AS state, customers_country AS country, value AS total FROM orders LEFT JOIN orders_total ON orders.orders_id=orders_total.orders_id WHERE orders_status=3 AND class='ot_total' ORDER BY last_modified DESC LIMIT 0,20 that is my working statement, but now i need to do this too: LEFT JOIN orders_total ON orders.orders_id=orders_total.orders_id WHERE orders_status=3 AND class='ot_shipping' Difference: class='ot_shipping' They are coming from the same table. I need the 'Title' from ot_shipping, but not the 'Title' from ot_total. How would i do this? thanks
  13. Is it safe to use PHPMailer to send bulk mail? If so, how do i know it will not time out? Should i be using the phpMassMailer class? How do i know that that one will not time out? I am using my localhost godaddy dedicated SMTP server to send out mail, and only a couple will go through at a time. I have to wait about an hour for the rest to send. Is there another SMTP server i should be using? thanks
  14. Query failed: Can't connect to MySQL server on... At one time i was able to connect to the server remotely with this username and password i am using for localhost. Then, some settings were changed or something and now i can't get in remotely.
  15. datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 [mysql.server] user=mysql basedir=/var/lib [mysqld_safe] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid that is my config. what will it look like after i change this setting?
  16. Our mysql server is currently only letting us access it through a localhost connection. I need to be able to access it over the internet with other applications. Do i need to change something in the config file to do this? thanks
  17. nevermind a found an alternative to mhash for my app
  18. we tried that, but the source that we compiled was not the mhash for php. http://mhash.sourceforge.net/ That was installed and worked correctly, but then PHP needs the library to use it. How do i do that?
  19. We have a php application that needs mhash to work. Mhash did not come with our php4 with Cent OS 5. What are the steps needed to get mhash to work correctly? thanks
  20. SELECT SQL_CALC_FOUND_ROWS ID, STR_TO_DATE( modified, '%m/%d/%Y %H:%i:%s' ) AS modified, NULL AS organization, CONCAT( f_name, ' ', l_name ) AS name, address, city, state, zip, country, phone, email, payment_method, total, 'tack-wholesale.com' AS source FROM tack_orders WHERE '9999' >= modified AND modified >= '2005' AND 100000000000 >= total AND total >=0 ORDER BY modified ASC LIMIT 0 , 35 This did not return all dates after 2005. How would i get this to work?
×
×
  • 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.