Php code commonly used by webmasters to create web pages

Source: Internet
Author: User
Php code commonly used by webmasters to create web pages The code is as follows:


$ Str = file ("http://tq.tom.com/china/index.html ");
$ Count = count ($ str );
For ($ I = 0; $ I <$ count; $ I ++ ){
$ File. = $ str [$ I];
}
$ Tomtq = explode ("


", $ File );$ Tomtq = explode ("
", $ Tomtq [1]);
$ Tomtq = $ tomtq [0];
// $ Tomtq tom weather thief
?>



Weather forecast code




<Meta http-equiv = "Content-Type" c> <title> weather forecast </title> <style type = "text/css"> <! -- Td {font-size: 12px;} --> </style> <script language = "JavaScript" type = "text/JavaScript"> <! -- Var openW; function openWindow (theURL, winName, features) {// v2.0 // openW = window. open (theURL, winName, features); // var mxh2 = window. open ("about: blank", "window_mxh") // var mxh2 = window. open (theURL, winName, features); window. showModalDialog (theURL, test (), 'dialogheight: 270px; dialogWidth: 265px; scroll: no; status: no')} function test () {location. href = "index.htm ";} // --> script <script language = "javascript" id = "objscript"> script <script language = "JavaScript" type = "text/JavaScript" src =" http://www.116.com.cn/116/home/weather/public.js?7.1.2 "> Script <script language =" JavaScript "type =" text/JavaScript "src =" http://www.116.com.cn/116/home/weather/weather.js?7.1.2 "> Script <script language =" JavaScript "type =" text/JavaScript "src =" http://jsp.116.com.cn/notice/iptocityid.jsp "> Script <script language =" JavaScript "> var locid; var cityname; var defid; if (getCookie (" defid ") ='') {locid = CityID; setCookie ("defid", CityID);} else {locid = getCookie ("defid");} var havecheck; if (getCookie ("check") = '') {havecheck = '2';} else {havecheck = getCookie ("check");} var show; if (havecheck = '0 ') {locid = getCookie ("CityID"); show = 0;} else {locid = getCookie ("defid"); show = 1;} var urlstr =" http://jsp.116.com.cn/weather/ "+ Locid +". js? 7.1.2 "; document. all ["objscript"]. src = urlstr; // var oWea = new makeWeatherObj (); script <body topmargin = "0" leftmargin = "0" style = "background-color = transparent"> <SCRIPT language = "javascript"> var oWea = new makeWeatherObj (); script <p align = "center"> <table width = "180" height = "52" border = "0" cellpadding = "0" cellspacing = "0"> <tr> <td align = "center" valign = "middle"> <table width = "139" border = "0" cellspacing = "0" cellpadding = "0"> <tr> <td width = "53" rowspan = "2" align = "center"> <SCRIPT language = "javascript"> var weather24 = oWea. swWeather24.split ("-"); document. write (""); if (weather24.length = 2) document. write (""); script </td> <td width = "86" align = "center"> <SCRIPT language = "javascript"> document. write (oWea. swName); script </td> </tr> <td align = "center"> <SCRIPT language = "javascript"> var wendu = oWea. swWendu24.split ("-"); document. write ("" + wendu [0] + ""); script </td> </tr> </table> </p>
[Ctrl + A Select All Note: If you need to introduce external Js, you need to refresh it to execute]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.