Jump to content

QuickOldCar

Staff Alumni
  • Posts

    2,972
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by QuickOldCar

  1. http://www.php.net/manual/en/book.xmlwriter.php
  2. There's a big problem with this, word associations and the order people write the questions, is just too many variations. On top of that words have multiple meanings and also different context. I worked on making an AI for a little bit, I realized it needs to break down each word, find word patterns and their meanings, and display a few possible answers and let the user decide which one was correct or the closest match. After making myself a mock-up system I then realized I needed to store vast amounts of data to accomplish anything worth using for the public. Possibly linking to dictionary,thesaurus,encyclopedia,atlas,universities,libraries and any other public data source it might be possible. I don't think cleverbot is all that clever. I've seen better. Anyway I think you'll have better luck with answers and responses by using broken up phrases or words from their questions, then combine them together by the most popular key words for a possible answer. I believe to make a truly clever bot it needs to interpret what the user is asking in order to provide a decent response.
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Untitled Document</title> </head> <body> <?php // open this directory $myDirectory = opendir("upload"); // get each entry while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } // close directory closedir($myDirectory); //count elements in array $indexCount = count($dirArray); // Print ("$indexCount files<br>\n"); // sort 'em sort($dirArray); // print 'em print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n"); print("<TR><TH>Filename</TH><th>Filetype</th><th>Filesize</th></TR>\n"); // loop through the array of files and print them all for($index=0; $index < $indexCount; $index++) { if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files print("<TR><TD><a href=\"./upload/$dirArray[$index]\">$dirArray[$index]</a></td>"); print("<td>"); print(filetype("./upload/$dirArray[$index]")); print("</td>"); print("<td>"); print(filesize("./upload/$dirArray[$index]")); print("</td>"); print("</TR>\n"); } } print("</TABLE>\n"); ?> </body> </html>
  4. Nothing new there, the persons making the add-ons most likely quit trying to keep up with the many firefox updates.
  5. Yes it was down, it seems I get a lot of bad storms lately, try it now.
  6. wheel-up.com Is available at godaddy right now for 12 bucks
  7. I sit in utter silence, I already get enough distractions.
  8. Try to use this javascript script to lazy load the images, you can also change the pre image to what you want. http://www.dynamicdrive.com/forums/archive/index.php/t-46393.html
  9. <meta name="description" content="<?php echo $string_data;?>" > echo "<meta name='description' content='$string_data' >";
  10. Destroy the gd generated image at the end. http://php.net/manual/en/function.imagedestroy.php
  11. http://cassandra.apache.org/
  12. try this, I'm guessing thoughts is not the table name. See what the error reads. <?php include"scripts/connect_to_mysql.php"; $id = ""; $thought = ""; $thoughts = '<table border="0" align="center" cellpadding="4"> <tr> '; $sql = mysql_query("SELECT * FROM thoughts ORDER BY DESC LIMIT 1") or die ('Error: '.mysql_error ()); while($row = mysql_fetch_array($sql)){ $id = $row['id']; $thought = $row['thoughts']; $thoughts .= '<td><div align="center" style="font-family: Arial, Helvetica, sans-serif;"><font size="-2">' . $thought . '</font><br /></td>'; } $thoughts .= ' </tr> </table> '; ?>
  13. I only see that message when it didn't match the preg_match filetype $parse = parse_url($url); if(isset($parse['path'])){ $haystack = pathinfo($parse['path'], PATHINFO_EXTENSION); if(!preg_match("/(php|html|htm|asp|aspx|shtml|php4|php5|cfm|pl|jsp)/is", $haystack)){ echo "Didn't match file type"; die; } else { echo $haystack; //rest of code } }
  14. lol, was just gonna write that $_SERVER['HTTP_REFERER'] yes referrer is the correct word, but php uses it with referer http://php.net/manual/en/reserved.variables.server.php
  15. http://dev.mysql.com/doc/refman/5.6/en/select.html http://www.php.net/manual/en/function.mysql-query.php http://www.w3schools.com/PHP/php_mysql_select.asp http://www.tizag.com/mysqlTutorial/mysqlselect.php
  16. http://www.php.net/manual/en/function.exif-read-data.php png is not supported for exif data You can use GD locally on the image after you download it. http://www.php.net/manual/en/function.gd-info.php http://www.php.net/manual/en/function.getimagesize.php http://www.php.net/manual/en/function.image-type-to-mime-type.php And I guess show the rest of your code for how you associate the mysql inserts.
  17. Here's a parse url function that parses the domains url. For the main domain host it gets way more complicated, but I have that as well. <?php function getparsedHost($new_parse_url) { $new_parse_url = str_ireplace(array("https://", "http://", "ftp://", "feed://"), "", trim($new_parse_url)); $parsedUrl = parse_url("http://$new_parse_url"); return "http://".trim($parsedUrl['host'] ? $parsedUrl['host'] : array_shift(explode('/', $parsedUrl['path'], 2))); } $testurl = "http://music.aol.com/new"; echo getparsedHost($testurl); ?> For why it chopped the http:www., just put it back <?php function sitename() { $result = $_SERVER['HTTP_HOST']; return "http://".$result; } ?>
  18. Lets see what you got so far for code. I'll be gone all day, but I'm sure someone will help sooner.
  19. php is well suited for this task create href links by using unique values, the post id can be this value echo "<a href='script_name.php?id=$id'>title id more</a>": On the script page use a $_GET['id'], a mysql query for that id, and display the results you want.
  20. Depending on the price, it might just be worth getting a barebones kit, either assemble yourself or a friend can. http://www.tigerdirect.com/applications/category/category_slc.asp?CatId=332&name=AMD-Barebone& I was an AMD guy for years, but you just can't beat the new i5 and i7 intel quad cores. http://www.tigerdirect.com/applications/category/category_slc.asp?CatId=333&name=Intel-Barebone& This i5 kit is a real bargain, I just built one similar for myself. http://www.tigerdirect.com/applications/SearchTools/item-details.asp?EdpNo=863122&CatId=333 In one click it went to 4.4ghz on the stock cooler, is no doubt it can go much higher. Personally I wouldn't buy anything less than an amd quad core, the dual core platforms are all phased out and near impossible to get parts. Also as a note to whomever reads this, comps from 2004 to 2007 era like to blow motherboard capacitors, and definately puking onboard video. A big cause of this is inferior power supplies installed by the manufacturers. The pent 4 was good in the day, but is a slug in comparison to the computers made in the past few years. What kills them for todays usage is usually 2 slots for the memory and a 2 gig maximum if your lucky. The cpu has to "think" about what it wants to do, hence a delay. If you have a pent 4 use it, but don't go and buy one.
  21. <?php if (is_page(26) || $post->post_parent=="26") { $rand_text = "about"; } elseif (is_page(17) || $post->post_parent=="17") { $rand_text = "get-involved"; } elseif (is_page(51) || $post->post_parent=="51") { $rand_text = "resources"; } elseif (is_page(55) || $post->post_parent=="55") { $rand_text = "gallery"; } elseif (is_page(69) || $post->post_parent=="69") { $rand_text = "whats-new"; } elseif (is_page(71) || $post->post_parent=="71") { $rand_text = "testimonials"; } else { $rand_text = "default"; } echo "<p>".randomtext($rand_text)."</p>"; ?>
  22. Personal webcrawler that can read xml's or even crawl and create it from websites. But with a twist, the links get organized by keywords as well. Like an advanced search/sitemap. Think of it as an advanced bookmarking/search engine system for the sites you want to include. I been thinking of making a system that is a community effort using each persons desktop crawler to collect and store data at a central server. User would input a site url, it would check the site for any xml's, if none exist check the central database, if still none and they opted to participate, the desktop crawler would do work during low cpu usage times. The collective data from each user would then be saved for them and the next person to use.
  23. It doesn't work through google translate. Having it work in english would be a good thing.
  24. change this: <input type="hidden" name="criteria" value="<?=$_POST['criteria'];?>" /> to this: <input type="hidden" name="criteria" value="<?php echo $_POST['criteria'];?>" /> also try to echo criteria and see if gets a value $criteria = $_POST['criteria']; echo $criteria;//test echo criteria $result_1= mysqli_query($link, "SELECT * FROM studentdetails, criteria WHERE studentdetails.StudentID = criteria.StudentID ORDER BY gpa ASC");
×
×
  • 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.