Category Archives: php

replace_ereg

Posix ereg which will not be included in PHP6 core, you can optionally include it in the install, otherwise you’d use pcre preg_match. In WordPress, ereg is still used in the squirrelmail POP3 class (trunk), afaik wordpress as it is … Continue reading

Posted in php | Leave a comment

bing

for completeness : php bing serp scraping : $query = 'serp'; $page = 1; $start = ($page-1)*10; $url = 'http://www.bing.com/search?q='.urlencode($query)."&first=".($start+1);   $curl_handle = curl_init(); curl_setopt($curl_handle,CURLOPT_URL, $url); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); $return = curl_exec($curl_handle); curl_close($curl_handle);   $parts = split('<h3>', $return);   … Continue reading

Posted in php, serp | Tagged , | 1 Comment

wordpress : fun with pluggable classes

I was checking some idea i had about writing a small user class with an option to ‘plug in’ functions for wordpress. This page covers most of it : dynamically add functions to php classes @ www.gen-x-design.com. The class construct … Continue reading

Posted in php, wordpress | Tagged | Leave a comment