1. Trang chủ
  2. » Công Nghệ Thông Tin

Plug in PHP 100 POWER SOLUTIONS- P75 docx

5 190 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 395,61 KB

Nội dung

336 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 336 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s bots, 118, 121, 288, 312 <br> tags, 34, 35–36 brightening images, 69 browsers mobile, 170–174 web. See web browsers bulletin board (BB) code, 134–137 Bypass Captcha plug-in, 312–314 C calculator functionality, 112–114 capitalizing text, 37–39 Caps Control plug-in, 37–39 Caps Lock key, 37–39 Captcha test bypassing, 312–314 creating, 118–122 verifying, 122–124 cast statement, 48 catch statement, 279 CDATA (character data), 257, 261, 266 CentOS Linux, 16–17 character data (CDATA), 257, 261, 266 charts, 236–240 chat facilities auto scrolling, 189–193 displaying messages, 181–183, 189–193 posting messages, 183–189 predictive technology, 304–308 private messages, 187–191 text speak acronyms, 203–206 Check Captcha plug-in, 122–124 Check Links plug-in, 92–95, 142–144 client URL. See CURL entries Close Session plug-in, 225–226 code HTML. See HTML code PHP. See PHP code scope, 29–30 Command Line Client, 211 companion web site, 51, 320 compression, 77, 79 content management, 87–110 absolute URLs, 88–90 copyright messages, 100–101 displaying lists, 103–105 embedded YouTube video, 101–103 extracting links from URLs, 90–92 hit counters, 105–107 listing directories, 95–97 query highlighting, 98–100 referring pages, 98–99, 108–110 relative URLs, 88–90 verifying web site links, 92–95 contrast, 69 Convert Currency plug-in, 272–275 cookies blocking users by, 230–233 deleting, 230 described, 228 managing, 228–230 copyright messages, 100–101 Corner Gif plug-in, 327–330 count() function, 106 Count Tail plug-in, 47–49 country, determining, 310–312 Create Captcha plug-in, 118–122 Create Google Chart plug-in, 236–240 Create List plug-in, 103–105 Create Session plug-in, 221–223 Create Short URL plug-in, 148–151 CREATE TABLE command, 210 credit card validatation, 114–117 cropping images, 71–73 Curl Get Contents plug-in, 241–243 curl_close() function, 195, 242 curl_exec() function, 195, 242 curl_init() function, 242 CURLOP_POST option, 195 CURLOP_POSTFIELDS option, 195, 197 CURLOPT_RETURNTRANSFER option, 195 CURLOPT_URL option, 242 CURLOPT_USERAGENT option, 195, 242 CURLOPT_USERPWD option, 195 CURLOP_URL option, 195, 242 curl_setopt() function, 242 currency conversions, 272–275 D darkening images, 69 databases. See MySQL date() function, 255, 262, 266 I n d e x 337 I n d e x 337 dates copyright messages, 100–101 expiration, 114–115 expiry (cookies), 226, 229 “friendly” display of, 47–49 Debian Linux, 12–14. See also Linux systems delay counter, 296 diacritic characters, 55–56 dictionary file, 52, 54, 303–304, 318–324 die() function, 77, 158, 192, 213 directories, listing, 95–97 Directory List plug-in, 95–97 disk, saving images to, 64, 78–80 Display Bing Map plug-in, 332–334 display property, 291 <div> tags, 280, 284, 291, 292, 333 Document Object Model (DOM), 91, 164, 250, 281, 285 document root Linux systems, 16, 17 Mac systems, 20, 24 Windows systems, 12 DOM (Document Object Model), 91, 164, 250, 281, 285 E echo statements, 162, 183 e-mail page change notification, 162 protecting, 287–289 sending, 131–134 spam detection, 130–131 validating addresses, 128–130 e-mail harvesting programs, 287 Embed YouTube Video plug-in, 101–103 embossing images, 69 emoticons, 200–203 error messages. See also warnings generating, 124–128 suppressing, 91, 250, 266 Zend Server CE, 25 eval() function, 112–114 Evaluate Expression plug-in, 112–114 exclusive locks, 180 explode() function Caps Control plug-in, 38 Convert Currency plug-in, 274 Get Guestbook plug-in, 182 Get Yahoo! Stock News plug-in, 261 Page Updated? plug-in, 160 Post to Chat plug-in, 186 Referer Log plug-in, 109 Spell Check plug-in, 52 Suggest Spelling plug-in, 321 Wrap Text plug-in, 35 expressions, evaluating, 112–114 F Facebook, 176, 280–284 FAT (file allocation table), 180 Fedora Linux, 14, 16–17 Fetch Flickr Stream plug-in, 249–251 Fetch Wiki Page plug-in, 243–248 file allocation table (FAT), 180 file_get_contents() function Curl Get Contents plug-in, 241, 242 Fetch Flickr Stream plug-in, 250 Get Yahoo! Answers plug-in, 253 Get Yahoo! News plug-in, 266 Get Yahoo! Stock News plug-in, 261 Google Translate plug-in, 325 Post Ajax Request plug-in, 284 Search Google Books plug-in, 270 Search Yahoo! plug-in, 257 Send Tweet plug-in, 195 file_put_contents() function, 149, 185 files. See also HTML files; PHP files .htaccess, 152–153 included, 28–32 not found, 29 required, 29 uploading, 60–64 Flickr image streams, 249–251, 295–299 flock() function, 106, 109, 180 flood control, 178–179, 185–187 flush() function, 191 fonts TrueType, 80–83, 118, 120–121 web browsers and, 80–83 fopen() function, 180 foreach loop, 35, 322 forms BB code, 134–137 Captcha test, 118–124 338 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 338 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s forms (cont.) evaluating expressions, 112–114 plug-ins for. See plug-ins, forms/ user content predicting words, 304–308 prompting input on, 299–302 sending e-mail, 131–134 spam detection, 130–131 user input in. See user input validating credit cards, 114–117 validating e-mail addresses, 128–130 validating text in, 124–128 Friendly Text plug-in, 39–43 fseek() command, 186 fwrite() function, 180 G GD images, 60, 65, 80, 236–240 GD library, 60, 80 Get Ajax Request plug-in, 285–287 Get Amazon Sales Rank plug-in, 316–318 Get Country by IP plug-in, 310–312 Get Guestbook plug-in, 181–183 Get Links from URL plug-in, 90–92 GET request, 139, 238, 280, 285–286 Get Title from URL plug-in, 144–145 Get Tweets plug-in, 198–200 Get User from DB plug-in, 214–216 Get Yahoo! Answers plug-in, 252–255 Get Yahoo! News plug-in, 264–268 Get Yahoo! Stock News plug-in, 259–264 get_file_contents() function, 145 GFDL (GNU Free Documentation License), 243 GIF images Captcha, 120, 123–124 converting to/from different formats, 78–80 converting TrueType fonts to, 80–83, 118, 120–121 corner, 327–330 displaying, 76–78 edge, 327–330 quality setting, 80 rounded corners, 330–332 smileys, 200–203 Gif Text plug-in, 80–83 glob() function, 124 global keyword, 29–30 global scope, 29–30 GNU Free Documentation License (GFDL), 243 Google AdSense, 32 Google Analytics, 10 Google Books, 268–272 Google Charts, 236–240 Google search engine, 256–259 Google Translate plug-in, 324–327 GRANT command, 212 grayscale images, 69 Guestbook feature, 178–183 H Hash Code, 137–140 hash tokens, 120 header() function, 152 Hit Counter plug-in, 105–107 hit counters, 105–107 hotspots, 293–294 .htaccess files, 152–153 HTML code converting RSS to, 168–170 converting to RSS, 163–167 correct insertion of tags, 31 enhancing for mobile browsers, 170–174 including, 31–32 inserting, 31–32 for lists, 103–105 HTML files. See also files including, 31–32 inserting, 31–32 inserting snippits from, 31 Linux systems, 16, 17 Mac systems, 20, 24 Windows systems, 12 HTML to Mobile plug-in, 170–174 HTML to RSS plug-in, 163–167 htmlentities() function, 136, 139, 219 HTTP requests, 11 I n d e x 339 I n d e x 339 I IF NOT EXISTS clause, 210 if…else pair, 36 <iframe> tag, 186, 284 IIS (Internet Information Server), 6 Image Alter plug-in, 68–71 Image Convert plug-in, 78–80 Image Crop plug-in, 71–73 Image Display plug-in, 76–78 Image Enlarge plug-in, 73–76 image formats, 78–80 image URLs, 295–299 Image Watermark plug-in, 83–86 ImageAlter() function, 120 imagecopyresampled() function, 72 imagecreatefrompng() function, 238 imagecreatetruecolor() function, 72, 238, 328 imagedestroy() function, 238 imagegif() function, 329 images, 59–86. See also photos altering, 68–71 aspect ratio, 66 blurring, 69 brightening, 69 Captcha, 118–124 compression, 77, 79 contrast, 69 converting to different formats, 78–80 cropping, 71–73 darkening, 69 displaying, 76–78 edge detection, 69, 70–71 embossing, 69 enlarging, 73–76 Flickr streams, 249–251, 295–299 formats, 76–78 GD, 60, 65, 80, 236–240 GIF. See GIF images grayscale, 69 increasing red/green/blue, 69 inverting, 69 JPEG. See JPEG images modifying, 68–71 PNG, 76–80, 85, 238, 239 quality, 66, 76–80 resizing, 64–68, 73–76 saving to disk, 64, 78–80 sharpening, 69 “sketchifying,” 69 slide shows, 295–299 smoothing, 73–76 thumbnail, 66–68 transforming, 68–71 uploading, 60–64 watermarks, 83–86 <img> tag, 173, 297 in_array() function, 149, 152, 179 include command, 28–29 included files, 28–32 included URLs, 32 include_once command, 28–29 indenting paragraphs, 34, 35, 36 INDEX() statement, 210 innerHTML property, 293 input. See user input Input Prompt plug-in, 299–302 Internet Information Server. See IIS Internet plug-ins. See plug-ins, Internet inverting images, 69 IP addresses banning users via, 230 determining country via, 310–312 determining online presence via, 177 identifying, 106 is_array() function, 143 ISBN numbers, 314–318 isset() function, 229, 238 J JavaScript. See plug-ins, JavaScript JavaScript Object Notation (JSON), 287, 325 JPEG images converting to/from different formats, 78–80 displaying, 76–78 resizing, 65 JSON (JavaScript Object Notation), 287, 325 json_decode() function, 325 L LAMP packages, 2 language translation, 324–327 340 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 340 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s license agreement, Zend Server, 4, 5 links. See also URLs automatic back links, 145–148 checking, 90–92 extracting from URLs, 90–92 mobile browsers and, 172–173 obtaining from URLs, 90–92 verifying in web sites, 92–95, 142–144 Linux systems Apache Web Server, 20 CentOS Linux, 16–17 Command Line Client, 212 Debian Linux, 12–14 document root, 16, 17 Fedora Linux, 16–17 HTML files, 16, 17 installing MySQL, 16–17 installing Zend Server, 12–17 passwords, 13, 16 PHP files, 16, 17 RHEL Linux, 16–17 SUSE Linux, 17 Ubuntu Linux, 14 uninstalling Zend Server, 14, 16, 17 list() function, 149, 152, 177 lists clickable list of words, 302–304 creating, 103–105 drop-down, 320, 323 nested, 246 ordered/unordered, 246 load() function, 296 LOCK_EX parameter, 180 LOCK_UN parameter, 180 Luhn, Hans Peter, 115 Luhn algorithm, 116 M Mac systems Apache Web Server, 22, 23 Command Line Client, 212 passwords, 18–19, 20, 21, 22 Mac systems, Intel document root, 20 HTML files, 20 installing Zend Server, 18–21 PHP files, 20 uninstalling Zend Server, 21 Mac systems, Power PC document root, 24 HTML files, 24 installing Zend Server, 21–24 PHP files, 24 Magic Quotes setting, 220 mail() function, 131–134 Make Thumbnail plug-in, 66–68 MAMP packages, 2 MAMP program, installing, 21–24 Manage Cookie plug-in, 228–230 map display, 332–334 mathematical operators, 113–114 md5() checksum, 160 md5() function, 119, 210–211 messaging. See chat facilities Microsoft Virtual Earth, 332–334 Microsoft.XMLHTTP object, 279 mobile browsers, 170–174 mobile phones, 304–308 mod curl facility, 195 Mod Curl library extension, 242 mod rewrite facility, 150, 152, 153 modulus 10 algorithm, 115 mouseover events, 292–294 Msxm12.XMLHTTP object, 279 MySQL adding users, 208–214 case sensitivity, 211 getting users from, 214–216 installing from tarball, 17 installing on Linux, 16–17 passwords, 210, 216–217 sanitizing strings, 219–221 verifying users in, 216–218 MySQL plug-ins, 208–221 MySQL Sanitize String plug-in, 219–221 MySQL Server, 6, 16, 22 mysql_num_rows() function, 210, 215 mysql_query() function, 210, 211, 215 mysql_real_escape_string() function, 220 N \n (newline) character, 35, 179 Network File System (NFS), 180 . plug- in, 274 Get Guestbook plug- in, 182 Get Yahoo! Stock News plug- in, 261 Page Updated? plug- in, 160 Post to Chat plug- in, 186 Referer Log plug- in, 109 Spell Check plug- in, 52 Suggest Spelling. News plug- in, 266 Get Yahoo! Stock News plug- in, 261 Google Translate plug- in, 325 Post Ajax Request plug- in, 284 Search Google Books plug- in, 270 Search Yahoo! plug- in, 257 Send Tweet plug- in, . 28–29 indenting paragraphs, 34, 35, 36 INDEX() statement, 210 innerHTML property, 293 input. See user input Input Prompt plug- in, 299–302 Internet Information Server. See IIS Internet plug- ins.

Ngày đăng: 07/07/2014, 08:20