html
-
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…
-
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…
-
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 = 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…
-
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 =…