Tagged: html

2

Building Basic Websites

Every now and again you just need a basic site setup to have an internet presence. Normally this occurs for me when a friend or family member tells people I “do websites” and I get roped in to helping them out. So what options are there for a basic, modern website template. The obvious answer is WordPress. It’s a great content management system which anyone can use. Once it’s setup...

iframe to a specific div id on a landing page 0

iframe to a specific div id on a landing page

Below is the code to iframe an offer page but cut out all the stuff you don’t need. This is useful if you just want to iframe the form while using your own images etc. This is setup so you just enter the url and div id you want to jump to at the top of the php page. The height and width of the iframe can be adjusted further...

0

Simple HTML Cheat Sheet

Rich’s Simple HTML Cheat Sheet   <h1>This is a heading</h1>      <b>This is bold</b>       <i>This is itallic</i> <br />     = New line       &nbsp;   = Extra Space <a href=”contacts.htm”>Contact Form</a>    = Link <img src=”images/picture.jpg” />       = image <font size=”3″>hello world</font>     = changes font size Lists <ul> <li>List item1</li> <li>List item2</li> </ul> Tables <table> <tr> <td>top left</td> <td>top right</td> </tr> <tr> <td>bottom left</td> <td>bottom right</td> </tr> </table> Basic Page <!DOCTYPE html> <html> <head>...

Two php functions for scraping content and extracting links 0

Two php functions for scraping content and extracting links

////// Grab webpage ////// function webFetcher($url) { $crawl = curl_init(); curl_setopt ($crawl, CURLOPT_URL, $url); curl_setopt($crawl, CURLOPT_RETURNTRANSFER, 1); $resulting = $resulting.curl_exec($crawl); curl_close($crawl); return $result = $resulting; } //////////////////////////////// //// extract links //// function extract_links($text) { preg_match_all(‘/<\s*a[^<>]*?href=[\’”]?([^\s<>\’”]*)[\’”]?[^<>]*>(.*?)<\/a>/si’, $text, $match_array, PREG_SET_ORDER); $return = array() ; foreach ($match_array as $serp) { $full_anchor = $serp[0]; $href = $serp[1]; $anchortext = $serp[2]; if ( (preg_match(“/http:/i”,$href)) && (!preg_match(“/cache/i”,$href)) && (!preg_match(“/google.com/i”,$href)) && (!preg_match(“/youtube.com/i”,$href)) && (!preg_match(“/wikipedia.org/i”,$href)) && ($href[0]!= ‘/’)...