บทความ

กำลังแสดงโพสต์จาก ตุลาคม, 2012

จดกันลืม Connecting CSV (Text Delimiter) Database On The Fly

Text Delimited Database files are files that have each column separated by a specified delimiter (a comma, semicolon, etc.), and each separate row specified by a new line character. In Excel or Access you can save your tables as comma delimited files. A comma delimited file is an example of a text delimited file. This article will show you how to connect to CSV (Text Delimited) Database files on the fly. Connecting CSV (Text Delimiter) Database On The Fly: What do you have to do to make this code work: 1. Create virtual directory having script permission 2. Create a "Microsoft Text Driver" file DSN from your ODBC32 from Control Panel. Name it "CSV.DSN" (see appendix A) or Copy and paste the text from appendix A 3. Save sample data below to "data.txt" (see appendix B) 4. Save this article as "AnyName.asp" 5. Copy all the three files ("csv.dsn", "data.txt", and "AnyName.asp") on your virtual directory havi...

ไม่รู้ work ป่าว load page invisible

<!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" /> <script type="text/javascript"> function invisibleWindow(iframeID, url) { divel = document.createElement("div"); divel.id = "div" + iframeID; divel.style.width = "25px"; divel.style.height = "25px"; divel.style.visibility = "hidden"; //Add div  document.body.appendChild(divel);  domiframe = document.createElement("iframe");   domiframe.id = iframeID;   domiframe.src = url;   domiframe.style.width = "25px";   domiframe.style.height = "25px";   var divid = document.getElementById("div" + iframeID);   divid.appendChild(domiframe); } </script> ...

ไปเจอมา script random post wordpress

<?php // define mysql connect //Modified: //1. Read name, user, passwd of db automatically //2. Add "Get" Method: ?min=-1&max=-40 (be careful the minus) //3. Add Minute Randomiztion // Usage Example : 1. upload itself (domain root dir by the default) //                 2. http://www.domain.tld/RandomizePostTime?min=-1&max=-40 include "wp-config.php";    //change it when in subdir such as ../wp-config.php $dbname = $DB_NAME;    //database name $dbuser = $DB_USER;        //database username $dbpass = $DB_PASSWORD;    //your database password $dbhost = "localhost"; // this can usually stay 'localhost'   $wp_table = "wp_posts"; // define wordpress table name     $gmt_offset = '-8'; // -8 for California, -5 New York, +8 Hong Kong, etc.   $min_days_old = $_GET["min"]; ; // the minimum number of days old $max_days_old = $_GET["max"]; ; // the maxim...

Script Ping เรียก bot

link นี้ไม่เกี่ยวนะครับ แถมๆ http://wow-content.com/software/ ตัวจริงอยู่นี่ตามนี้เลย ... <? if($_POST) { $domains = explode("\n", $_POST[domains]); foreach($domains as $domain) { $domain = explode('|', $domain); $keyword = $domain[1]; $domain = str_replace(array('http://','/'),'',$domain[0]); echo $keyword . $domain; unset($urls); $domainshort = str_replace('www.','',$domain); $domainshortdash = str_replace('.','-',$domainshort); $urls[] = 'http://www.websiteoutlook.com/' . $domain; $urls[] = 'http://www.statbrain.com/' . $domain; $urls[] = 'http://www.builtwith.com/?' . $domainshort; $urls[] = 'http://snapshot.compete.com/' . $domainshort; $urls[] = 'http://www.aboutus.org/' . $domainshort; $urls[] = 'http://www.quantcast.com/' . $domainshort; $urls[] = 'http://www.cubestat.com/' . $domain; $urls[] = 'http...

Geoip แยกกลุ่มคนที่เข้าเว็บว่ามาจาก ประเทศไหน เพื่อให้คนที่เข้าเว็บเราไปยัง url ที่ ต้องการ

จัดเลยไม่อธิบายยาวๆ สร้าง index.php  แล้วก็  download http://www.maxmind.com/download/geoip/database/GeoLiteCountry/ แตกไฟล์ จะได้ GeoIP.dat แล้วเอามาวางที่ path เดียวกับ index.php <?php include("geoip.inc"); $ip=$_SERVER['REMOTE_ADDR']; $gi = geoip_open("GeoIP.dat",GEOIP_STANDARD); $country_code = geoip_country_code_by_addr($gi, "$ip"); // Country name is not used so commented // Get Country Name based on source IP //$country = geoip_country_name_by_addr($gi, "$ip"); geoip_close($gi); switch($country_code)     {         case "US": header("Location: http://facebook.com"); break;         case "CA": header("Location: http://thaiseoboard.com"); break;         case "GB": header("Location: http://sanook.com"); break;         case "TH": header("Location: http://amazon.com"); break;         default: header("Location: http://go...

การ foce click ไปยัง url ปลายทาง

foce Click เทคนิคนำคนที่เข้ามาเว็บไปยังหน้าที่เราต้องการให้ ถ้าคนที่เข้าเว็บเรามายังหน้าที่ไม่ถูกต้อง <html> <body> <script type="text/javascript">  function simulateClick(control)  {  if (document.all){  control.click();  }else  {  var evObj = document.createEvent('MouseEvents');  evObj.initMouseEvent('click', true, true, window, 1, 12, 345, 7, 220, false, false, true, false, 0, null ); control.dispatchEvent(evObj);  }  }   </script>   <a href="http://www.google.com" id="mytest1">test 1</a>   <br> <div id="mytest2" onclick="alert('Here we go');">And in a Div</div>    <script type="text/javascript"> simulateClick(document.getElementById('mytest1'));     simulateClick(document.getElementById('mytest2')); </script>   </body>  </html> ไปแล้ว ..

ว่าด้วยเรื่อง การ spin ข้อความ

การ spin ข้อความหรือ การ สลับสับเปลี่ยนการแสดงข้อความเพื่อให้เกิด uni content มากขึ้นใน เว็บไซค์ของเรา แต่การที่เราจะเอามาทำได้นั้น จะต้องมี บทความที่เป็นรูปแบบ ตัวอย่าง เรื่องการนำบทความหรือข้อความมาทำเดี๋ยวทำมาให้ดูครับ {where can I find|where to buy|How Do I|How to fix|get the best price for|How to remove|How to quit|price comparisons|price comparisons of|How to get rid off|How do you|low cost|low price|affordable|bargain|how do I get|How To|where can you buy|How to prevent|deals for|best price|best reviews of|compare|compare prices for|price compare|price comparisons for|the cheapest |online what is the best price for|where can I buy|who sells|buying|where to purchase|buy|online cheapest|cheapest online Promo|discounted|discount|How about|deals for|for sale|get cheap} ต้องสร้าง file  class_spin.php  ก่อนนะครับ <?php class Spinner {     # Detects whether to use the nested or flat version of the spinner (costs some speed)     public...

ว่าด้วยเรื่องของการ clear file (cache)

จำเป็นอย่างยิ่งถ้าหากเราใช้ host แล้วมี file cache จำนวนเยอะๆ จำทำให้ inode เรา มีจำนวนเยอะๆได้ ผมจึงมี module การ clear ข้อมูลที่ไม่จำเป็นออกไปอาจจะเอาไปประยุกต์กันได้ดีเลยทีเดียว จัดการ clear cache หรือ file ที่มีจำนวนเยอะๆ ได้ <? $cachedir = "importcsv/temp/csv";             //เลือก folder หรือ path ที่ต้องการ clear ข้อมูล if ($cachehandle = opendir($cachedir)) {    //ใช้ function opendir เพื่อ เปิด folder    while (false !== ($file = readdir($cachehandle))) {   //จากนั้น ใช้ loop เพือ วน อ่าน     if ($file != "." && $file != "..") {           //ตรวจสอบว่ามี file อยู่หรือไม่         $file2del = $cachedir."/".$file;            unlink($file2del);                    ///ทำการลบ file ออก        }    }    closedir($cachehandle); ...