Jump to content

liderbug

Members
  • Posts

    15
  • Joined

  • Last visited

Everything posted by liderbug

  1. Oh, never mind, don't ask. 😖 Snake bite, <sigh>
  2. I'm trying to get a Google map to work with polygons. var points = [ new google.maps.LatLng(39.0174, -104.6634) , new google.maps.LatLng(39.0190, -104.6634) , new google.maps.LatLng(39.0190, -104.6700) , new google.maps.LatLng(39.0174, -104.6700) ]; works just fine. ---------------------- $q1 = mysqli_query ($con, "select * from points;"); while ($r1 = mysqli_fetch_row ($q1)) { $results[$n++] = "(" . $r1[0] . ")"; } var points = <?php echo json_encode($results); ?>; alert (points); in both cases displays the same (39.0174,-104.6634... numbers. Except the sql doesn't display anything - well the map but not the polygon. I'd love any help you can give. Thanks
  3. I've just downloaded a 3d party app and I'm finding that most (98%) of the [files].php have a "<?php" but not a "?>" in them. I created a tst.php...HW and it seems to not care. An improvement? Mox-Nix? Poor form? Or the same coder the loves 0xEEE text on a 0xFFF background because it's sooooo cool. Head @ 42 deg ///// Thanks cal
  4. Woke up today and mind still mulling - Pear Mail will randonly fail because one of two IP's associated with one URL doesn't respond. But fsockopen("relay.dnsexit.com" worked every time. Hmmmm, must assume the two processes do getaddressinfo (or whatever) differently. OK, I think I can (gawd I hope...) I can drop the subject :-/
  5. Stumbled across the problem : $host = "relay.dnsexit.com"; Seems that name can return 2 different IP addresses 64.182.102.185/186 I hard coded 185 and sent 5 for 5, 5 for 5, 5 for 5. Just checked 186 went 0 for 5. So, Kicken, you were/are real close. My final comment.... @@#^! %*&^ @* computers!!!
  6. My code - perloined from some site some time back as howto Pear Mail.php example. ---------------------------------------------------------------- $host = "relay.dnsexit.com"; $username = "myname"; $password = "mypass"; # $to = "$em[0]"; #em = result mysql_query select... $to = "me@myemail.com $mime = new Mail_mime(array('eol' => $crlf)); $mime->setTXTBody($text); $mime->setHTMLBody($html); $headers = array ( 'from' => "Editor@ournewspaper.com", 'to' => $to, 'reply-to' => "Editor@ournewspaper.com", 'subject' => "Your weekly News"); $headers = $mime->headers($headers); $smtp = Mail::factory('smtp', array ( 'host' => $host, 'username' => $username, 'password' => $password, 'auth' => true, 'port' => 80 # port 25 gives the same results )); $body = $mime->get(); $mail = $smtp->send($to, $headers, $body); if (PEAR::isError($mail)... ------------------------------------------------------------------- If I run the program in a loop of 5 emails (although all come to me) I get: Failed to connect to relay.dnsexit.com:80 [sMTP: Failed to connect socket: Connection refused (code: -1, response: )] OK OK Failed... OK It's doing the exact same thing 5 times in a row but fails at random. The next time all 5 fail, the next time the first one fails followed by 4 OK's. I can loop "$fp = fsockopen("relay.dnsexit.com", 25, $errno, $errstr, 30);" 20 times and no failures. Any thoughts? Thanks Chuck
  7. I'm stumped! My box at home runs the above code just fine. PHP = 5.3.20. The same code on the hosting box runs a blank screen until all done then outputs everthing at one time. PHP = 5.2.17. I've tried to compair the 2 php.ini files - apples-n-oranges. Maybe it a version thing and 5.3 works. I've asked my hosting company to see if it runs on a 5.3 box - if they have any. Guess I could transfer the email send function to my home puter......
  8. However, checking to see is anything was posted later I found cesoid at gmail dot com about 3/4 down the page (aside, why is nothing in time order???) <?php ob_implicit_flush(); ob_end_flush(); ?><body>[1013 more characters]<?php for ($i = 1; $i < 30000000; ++$i) {} echo "something that didn't show up immediately"; ?> and this works - so I modified it: $list = array ("email1", em2, 3 4 5...); foreach ($list as $li) { echo "$li<br>"; sleep (1); #to simulate sending an email to my relay host } and I get email1 (pause... em2 (pause.... 3 (pause back in business. WT.......????? Hmmm, works local (home box) but not on server (east coast) more playing around - a php.ini difference... ?? More when I figure it out..
  9. Found this in my searches (is sort of hidden - well just not waving a flag...) http://us1.php.net/manual/en/function.ob-flush.php 5 Lee 9 months ago As of August 2012, all browsers seem to show an all-or-nothing approach to buffering. In other words, while php is operating, no content can be shown. Looks like I'm toasted Thanks.
  10. ... big secret - means nothing shows up. I click on the "OK to send" button and ............ nothing, Two or three minutes later still a blank screen. [shhhhhh... it's a secret what the server did.] I am using require_once "Mail.php"; include_once 'Mail/mime.php' ; include "thisweeksmail.php"; Mysql DB, select email from table where... $mail = $smtp->send($to, $headers, $body); check for OK/Err and output to screen (what'ya mean tomnjanemsn.com - so what's wrong with that?????) "... don't upgrade..." Wasn't my call, my hosting company did it. - Just spent 20 minutes trying to find if I can "setversion [oldervers]; no luck. I guess I could rewrite the whole thing to run off-line, output to a file, mail file to me after. But then sort'a not the point. - What wasn't broken has now been fixed. And several times I've found flush (); to be such a nice feature - not so much for me but for who I wrote the page/script for - "Hey, I clicked on the 'GO' button and nothing happened." "Well ya, it takes 10-20 seconds for the first of 100 lines to show up." "Why?" <sigh> Chuck
  11. Did a search - nothing. I did find a reference on the web that > php 5.2.? (or some such number) that flush no longer works. I need a workaround. I send out a weekly email to about 180 via a relay host. In the past the code was a loop of: ... mail ($to... flush(); Worked great, warm fuzzies, bad addresses JUMPED right out - life was good. Now everything is a big secret and if something goes wrong ... 1. Is flush coming back? 2. Assuming I'm not the first - an all ready written peice of code? 3. Suggestions? Thanks
  12. insert_data.php is part of a larger package (zen cart). In the larger schema the code runs thru files A,B,C,D,insertdata,F,G,(backto)A. So I wrote foo4 to take the place of "D" which will have the lines: $data = file("data.csv"); foreach($data.... call insert_data.php. I know it can be done - just a mater of getting all of the duck properly lined up. cal
  13. I'm working on bulk loading data into a DB. The orig web page has the form, method=POST. Works fine ... 1. i.t.e.m. a.t. a. t.i.m.e. So I've figured out what I need to populate: $item = "Widget, red"; $quantity = 7; etc. etc. etc. Which I can do in foo4.php and then call "insert_data.php". However insert_data starts out with: $item = $_POST['item']; What I can't figure out is how to POST item in foo4 before calling insert_data :-\ Thanks. cal
  14. Loaded question and I'm looking for a biased answer. I speak LAMP. I've been asked to put up a web site with a shopping cart. I've loaded/played with oscommerce and zen. I will be downloading, from the wholesaler some 18,000 items several time a day, in a txt file. I need to be able to parse the data, delete from tablex,y&z and load indata from... So I'm looking for answers to: safest package, easiest package, most adaptable to the look & feel the client wants. ... and any other 20 questions not listed here Thanks for any pointers chuck
×
×
  • 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.