Example of using jsoup to extract all links from HTML
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 09:08:05
Original
1341 people have browsed it
The byte-order mark (BOM) is the Unicode character ("zero-width non-breaking whitespace") located at the code point U+FEFF. This character is used to indicate the byte order when encoding a string of UCS/Unicode characters as UTF-16 or UTF-32. It is often used as a marker to indicate that a file is encoded in UTF-8, UTF-16, or UTF-32.
- class encryption {
- function en($str,$key) {
- $ret='';
- $str = base64_encode ($str);
- for ($i=0; $i< ;=strlen($str)-1; $i++){
- $d_str=substr($str, $i, 1);
- $int =ord($d_str);
- $int=$int^$key;
- $hex=strtoupper(dechex($int));
- $ret.=$hex;
- }
- return $ret;
- }
- function de($str,$key) {
- $ret='';
- for ($i=0; $i<=strlen($str)-1; 0){
- $hex=substr($str, $i, 2);
- $dec=hexdec($hex);
- $dec= $dec^$key;
- $ret.=chr($dec);
- $i=$i+2;
- }
- return base64_decode($ret);
- }
- }
- $cryption=new encryption;
- ?>
Copy code
- /*
- * Created on 2012-3-23
- *
- * To change the template for this generated file go to
- * Window - Preferences - PHPeclipse - PHP - Code Templates
- */
-
- $content = '';
- preg_match('/
]*src=["']Butt[/]?(.+?)["']Butt[^>]* >/si', $content, $matches);
-
- print_r($matches);
- echo '
';
-
- preg_match('/
]*src=[ "']Butt[/]?(.+?)["']Butt[^>]*>/si', $content, $matches);
- print_r($matches);
-
- define( 'HTTP_PATH','http://'.$_SERVER['HTTP_HOST']);
- $img = getimagesize(HTTP_PATH.$matches[1]);
- print_r($img);
-
- mb_internal_encoding('UTF-8 ');
- $a = 'I love youI love you';
-
- echo mb_strlen($a);
- echo '
';
- echo mb_substr($a,1,2);
-
- ?>
-
Copy code
- // +---------------------------------------- --------------------------------
- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
- // + -------------------------------------------------- --------------------
- // | Copyright (c) 2009 http://thinkphp.cn All rights reserved.
- // +------ -------------------------------------------------- ---------------
- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
- // +---------- -------------------------------------------------- ----------
- // | Author: liu21st
- // +--------------------- --------------------------------------------------
-
- //Define the ThinkPHP framework path
- define('THINK_PATH', 'ThinkPHP');
-
- //Define the project name and path
- define('APP_NAME', 'Home');
- define('APP_PATH', 'Home' );
-
-
- define('NO_CACHE_RUNTIME', true);
- //define('RUNTIME_ALLINONE', true);
-
-
- // Load the framework entry file
- require(THINK_PATH."/ThinkPHP.php");
-
- //Instantiate a website application instance
- App::run();
- ?>
Copy code
|
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11
Latest Issues
-
2025-03-21 13:39:34
-
2025-03-21 13:38:34
-
2025-03-21 13:37:19
-
2025-03-21 13:35:24
-
2025-03-21 13:34:32