Jump to content

schilly

Members
  • Posts

    870
  • Joined

  • Last visited

    Never

Everything posted by schilly

  1. mysql_real_escape_string() when you store.
  2. Here is the response from google: <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.0"> <Response> <name>Montreal,QC,Canada</name> <Status> <code>200</code> <request>geocode</request> </Status> <Placemark id="p1"> <address>Montréal, QC, Canada</address> <AddressDetails Accuracy="4" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"> <Country> <CountryNameCode>CA</CountryNameCode> <AdministrativeArea> <AdministrativeAreaName>QC</AdministrativeAreaName> <Locality> <LocalityName>Montréal</LocalityName> </Locality></AdministrativeArea></Country></AddressDetails> <Point> <coordinates>-73.639076,45.545447,0</coordinates> </Point></Placemark></Response></kml> I think it has something to do with the french character in Montreal.
  3. I'm trying to build a map according to where all my users live. Currently I am trying to generate a KML file of the users location by getting the geocode data from google using simple_xml_load. Going off this tutorial: http://code.google.com/apis/maps/articles/phpsqlgeocode.html#samplecode My first few queries work ex. http://maps.google.com/maps/geo?output=xml&key=google_key&q=Vancouver%2C+BC%2C+Canada but it dies when it hits: http://maps.google.com/maps/geo?output=xml&key=google_key&q=Montreal%2C+QC%2C+Canada I get a warning error saying: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0xE9 0x61 0x6C 0x2C If I plug the url that doesn't work into my browser I get the proper response so I'm too sure why it would crap out. I'm not too familiar with the different string encoding types but the query strings are the exact format so not sure why it would complain. Any help is appreciated. Let me know if you need any code. Thx.
  4. Thanks guys. I was pretty certain you couldn't do it with GD. The host is uniserve which doesn't have ImageMagick =( I guess I could cURL into my test server to create them. So for that would I just send the raw image string data back?
  5. anyone know if GD can make thumbs from pdfs?
  6. I created a PDF->PNG thumb preview script using ImageMagick but the live server doesn't have it installed. Can you do the same with GD? I did a couple searches but couldn't find anything related to thumbnail creation from PDFs. Thx.
  7. Thanks for you help guys. I think I should be good now.
  8. I have full access and probably more knowledge than my friend. Is this an easy fix? I've never done a manual compile of php.
  9. Here is the configuration: './configure' '--prefix=/usr/local/php5' '--with-config-file-scan-dir=/usr/local/php5/etc' '--with-apxs2=/usr/local/apache2/bin/apxs' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--disable-cli' '--disable-cgi' '--enable-zend-multibyte' '--with-regex=system' > php -m date libxml Reflection standard [Zend Modules] >
  10. I believe it's a full control hosted server. Can you tell by the phpinfo() print out?
  11. Ok ran this: <?php if (function_exists('preg_match')) { echo "preg_match available.<br />\n"; } else { echo "preg_match not available.<br />\n"; } ?> And it said it wasn't available. How do I enable it? Do I have to recompile PHP or is it an ini setting?
  12. I'm running into this error on a friend's server: "PHP Fatal error: Call to undefined function preg_match()" I assume preg_match was installed by default. Is there an easy way to check this and/or fix this? PHP v5.2.6 thx.
  13. you need to enable mysql in your php.ini file. search google for some tutorials. it's usually only a few lines you need to add/uncomment.
  14. <?php if ($checked = 'checked') {$active = 'T';} else { $active = '';} ?> change to $checked == 'checked'
  15. I believe your calling $mail->Send(); twice = 2 emails. <?php if(!$mail->Send()) { // echo "Message was not sent, please try again. <p>"; // echo "Mailer Error: " . $mail->ErrorInfo; //write bad email address to file $File = "email_error.txt"; $Handle = fopen($File, "a"); fwrite($Handle, $emailit ); fwrite($Handle, "\n" ); fclose($Handle); //exit; } // message is sent! //echo "<meta http-equiv='refresh' content='3; url=http://www.***.org'>"; //echo "<center><br>A Represenative will be contacting you shortly about your inquery.</center>"; echo "email sent to the email address in file: $emailit"; if($mail->Send()) { // echo "Message was not sent, please try again. <p>"; // echo "Mailer Error: " . $mail->ErrorInfo; //write bad email address to file $File = "email_good.txt"; $Handle = fopen($File, "a"); fwrite($Handle, $emailit ); fwrite($Handle, "\n" ); fclose($Handle); //exit; } } //} //else //{ //echo "No form was submitted !"; //} ?> I think you want: <?php if(!$mail->Send()) { // echo "Message was not sent, please try again. <p>"; // echo "Mailer Error: " . $mail->ErrorInfo; //write bad email address to file $File = "email_error.txt"; $Handle = fopen($File, "a"); fwrite($Handle, $emailit ); fwrite($Handle, "\n" ); fclose($Handle); //exit; } else { // echo "Message was not sent, please try again. <p>"; // echo "Mailer Error: " . $mail->ErrorInfo; //write bad email address to file $File = "email_good.txt"; $Handle = fopen($File, "a"); fwrite($Handle, $emailit ); fwrite($Handle, "\n" ); fclose($Handle); //exit; } ?>
  16. sounds like a string field. if you are storing time, either use the sql time field or store it as an int using the unix timestamp. I always use the unix timestamp( time() ) then format it in php after( date("date string",time() ).
  17. schilly

    Forums

    But I think your looking for something like this. $forumTopicQuery = "SELECT * FROM forum_topics, forum_posts WHERE forum_topics.forum_topic_id = forum_posts.forum_post_topicid and forum_topics.forum_topic_forumid = $forum_id AND forum_topics.forum_topic_id = $forum_topic_id ORDER BY forum_posts.forum_post_date ASC LIMIT 1";
  18. schilly

    Forums

    Move to Mysql help?
  19. nope uses mail. when you said you were using php mailer i thought you meant PHP Mailer: http://phpmailer.codeworxtech.com/
  20. I'm guessing probably 300 at a time per server. Not too familiar with php mailer but you will prolly have to write to code yourself to break them up into batches of 300. could just do some nested loops. have an multi-d array of the smtp info (ie. Array( Array(smpt server, login, password), ..., etc) ) then $stmp_info = //multi-d array with server info while( $i < array_len($stmp_info)){ $counter = 0; while($row = mysql_get_array($resource)){ //send out email from the email address in the db row based on smtp info at $stmp_info[$i] $counter++; if($counter == 300) break; } $i++; } something like that. it's probably not totally correct and would require some testing but i hope you get the idea.
  21. Please explain your problem in more detail.
  22. create gmail, hotmail, yahoo accounts and send through them with authenticated smtp?
  23. $FEEBUY = $BASEMOUNT * $BUYER_PERCENTAGE / 100;
  24. Use opendir() to get the handle of the directory then use a while with readdir() to get each filename. Check to see if the filename has the jpg extension then increment a counter.
×
×
  • 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.