Posts by dtbaker

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Something like my php search engine coupled with my above php site map generator.

Upload it to your server, give it a URL to “index”, then take all that index data (ie: all the pages it can find on a site) and build up a sitemap.

Save the sitemap as a HTML file so you can upload it to the destination site manually?

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Crap, too busy, haven’t started.

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

I’d say php to start with.

Lots more beginner tutorials and cheap hosting accounts out there

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Yep I’m not too sure.

The forward slashes / are encoded as & #47 ; in the string.

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Hey guys,

On the theme screenshot page (the one with all the little thumbnails along the top)

Is this encoding correct?

<a href="/theme_previews/156868-magento-simple-email-newsletter-extension?index=0"> 
              <img src="http:&#47;&#47;s3.envato.com&#47;files&#47;1512269&#47;screenshots&#47;01_preview-of-magento-newsletter-plugin.__thumbnail.jpg" /></a> 
            <a href="/theme_previews/156868-magento-simple-email-newsletter-extension?index=1"> 
              <img src="http:&#47;&#47;s3.envato.com&#47;files&#47;1512269&#47;screenshots&#47;02-magento_my_account_newsletter_subscription_options.__thumbnail.jpg" /></a> 

all those &#47;&#47; bits – has it been outputted incorrectly or is that a valid way of outputting src links?

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says
class with caching (2 days).
gets items thumbnails, full descriptions, etc..
example usage: http://dtbaker.com.au/premium-php-applications/index.html
class envato{
    private $_temp_folder;
    private $_ch;
    public function __construct(){
        $this->_temp_folder = '/tmp/envato_'.md5($_SERVER['HTTP_HOST']).'/';
        if(!is_dir($this->_temp_folder)){
            mkdir($this->_temp_folder);
        }
        $this->_ch = curl_init();
        curl_setopt($this->_ch, CURLOPT_HEADER, false);
        curl_setopt($this->_ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($this->_ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($this->_ch, CURLOPT_CONNECTTIMEOUT, 5);
        curl_setopt($this->_ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
    }
    public function grab_url($url,$post_data=array(),$clean=false,$force=false){
        $cache_id = md5($url.serialize($post_data));
        $data = false;
        if(!$force){
            $filename = $this->_temp_folder.$cache_id;
            if(is_file($filename)){ 
                if(filemtime($filename) > (time() - 172800)){ 
                    $data = file_get_contents($filename); 
                }
            }
        }
        if(!$data){
            curl_setopt($this->_ch, CURLOPT_URL, $url);
            if(count($post_data)){
                curl_setopt($this->_ch,CURLOPT_POST,true);
                curl_setopt($this->_ch,CURLOPT_POSTFIELDS,$post_data);
            }else{
                curl_setopt($this->_ch,CURLOPT_POST,false);
            }
            $data = curl_exec($this->_ch);
        }
        if(!$force){
            file_put_contents($filename,$data);
        }
        if($clean)$data = $this->_clean($data);
        return $data;
    }
    public function get_item($item_id){
        $url = "http://themeforest.net/item/dtbakers_class/$item_id";
        $data = $this->grab_url($url);
        $return = array();
        if(!empty($data)) {
            if(preg_match('#<a href="[^">]+><img alt="[^"]*" src="(http://[^"]+)" /></a>#msU',$data,$matches)){
                $return['large_thumb'] = $matches[1];
            }
            if(preg_match('#<div class="text">(.*)<div class="more-work"#msU',$data,$matches)){
                if(preg_match('#<div class="clear"><!--\s+--></div>\s+</div>(.*)#msU',$matches[1],$text)){
                    $return['content'] = $text[1];
                    $return['content'] = preg_replace('#<img[^>]+>#imsU','',$return['content']);
                    $return['content'] = preg_replace('#<h1>[^<]*</h1>#imsU','',$return['content']);
                }
            }
            $url = "http://themeforest.net/theme_previews/$item_id-dtbakersclass";
            $data = $this->grab_url($url,array(),true,false);
            if(preg_match_all('#index=(\d+)\'>\s*<img src="(http://[^"]+)" /></a#',$data,$matches)){
                $return['thumbs'] = array();
                foreach($matches[2] as $thumbnail){
                    $return['thumbs'][$thumbnail] = str_replace('.__thumbnail','',$thumbnail);
                }
            }
        }
        return $return;
    }
    public function get_user_items($user,$marketplace='themeforest'){
        $url = "http://marketplace.envato.com/api/v2/new-files-from-user:$user,$marketplace.json";
        $data = $this->grab_url($url);
        if(!empty($data)) {
            $json_data = json_decode($data, true);
            $files = $json_data['new-files-from-user'];
            return $files;
        }
        return array();
    }
    private function _clean($data){
        return preg_replace('/\s+/',' ',$data);
    }

}
3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Depends totally on how each is used. Can’t compare one to the other like that.

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Lots frequent envato’s job board as well: http://jobs.freelanceswitch.com/

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Best to follow the instructions on http://www.google.com/cse/

3263 posts
  • Helps us moderate the forums
  • Has been part of the Envato Community for over 5 years
  • Helped several times protecting Envato Market against copyright violations
  • Won a competition
+15 more
dtbaker Moderator says

Which of the 10 questions did you get stuck on?

(moved to site feedback)

by
by
by
by
by
by