Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-11-2008, 04:14 PM   #1
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
I need something like TEVS, but static.

I like TEVS, it does its job nicely, but these dynamic pages are killing my box. The load is brutal at 100k a day, its killing my ability to grow.

I need something TEVSesque but that generates static pages. I dont even need bulk import functionality, user uploads, any of that crap.

Something that just takes sponsor embed code, add some text, a title, and it shits out an html page with the aforementioned input.

Anything?
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:25 PM   #2
HorseShit
Too lazy to set a custom title
 
Join Date: Dec 2004
Posts: 17,513
what kind of hardware are you running
HorseShit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:29 PM   #3
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
hw.model: Intel(R) Pentium(R) 4 CPU 2.80GHz
hw.ncpu: 2
hw.physmem: 1059479552
hw.usermem: 738578432
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:31 PM   #4
HorseShit
Too lazy to set a custom title
 
Join Date: Dec 2004
Posts: 17,513
hit me up
HorseShit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:37 PM   #5
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
You can make TEVS static... I did it.. you can do it too.
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:38 PM   #6
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
Tell me how to make tevs static, please.
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:39 PM   #7
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
oke, give me a moment, opening dreamweaver to grab the codes
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:41 PM   #8
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
you fuckin rule.
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:44 PM   #9
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
First Step - Create a php page called cache.php
and dump this code in it....

Code:
<?
/**
 * Cache - Output caching
 * @package Cache
 * @author degro
 * @copyright 2008 Harry Varwijk - AWMS-Network.com
 */
class Cache
{

	function Cache($path, $disable=false, $disable_output=false)
	{
		if(!is_dir($path))		trigger_error("Path is not directory!", E_USER_ERROR);
		if(!is_writable($path))	trigger_error("Path is not writable!", E_USER_ERROR);

		if(!in_array(substr($path,-1),array("\\","/"))) $path.="/";
		
		$this->path = $path;
		$this->disable = (bool)$disable;
		$this->disable_output = (bool)$disable_output;
		$this->stack = array();
		
		$this->output = null;
	}
	
	function _output($output)
	{
		$this->output = $output;
		if(!$this->disable_output) echo $output;
	}

	function _load($file,$time)
	{
		$filename = $this->path.$file;
		
		if($this->disable) return false;
		if(!file_exists($filename)) return false;
		
		$f = fopen($filename, "r");
		$fstat = fstat($f);
		fclose($f);

		if(time()-$fstat['mtime']>$time) return false;
		
		return file_get_contents($filename);
		
	}

	function _start($file,$time)
	{

		$data = $this->_load($file,$time);
		if($data===false)
		{
			$this->stack[count($this->stack)] = $file;
			ob_start();
			return count($this->stack);
		}
		
		$data = $this->_unpack($data);
		
		$this->_output($data['__output__']);
		
		return $data;
	}

	function _unpack($data)
	{
		return unserialize($data);
	}

	function _pack($data)
	{
		return serialize($data);
	}
	
	function save($file,$time,$data=array())
	{

		if($this->disable) return false;

		$time = (int)$time;
		if(!$file) trigger_error("n-am fisier", E_USER_ERROR);
		if($time<1) trigger_error("timpul trebuie sa fie mai mare de 0", E_USER_ERROR);
		
		if(count($this->stack) && $file == $this->stack[count($this->stack)-1])
		{
			$filename = $this->path.$file;
			
			$data['__output__'] = ob_get_contents();
			ob_end_clean();
	
			if(file_exists($filename) && !is_writable($filename)) trigger_error("eroare la scriere", E_USER_ERROR);
	
			$f = fopen($filename, 'w');
			fwrite($f, $this->_pack($data));
			fclose($f);
			
			$this->_output($data['__output__']);
			
			unset( $this->stack[count($this->stack)-1]);
			
			return false;
		}
		elseif( count($this->stack) &&  in_array($file,$this->stack) )
		{
			trigger_error("eroare la stack: ".$this->stack[count($this->stack)-1], E_USER_ERROR);
			exit;
		}
		else
		{
			$r = $this->_start($file,$time);
			if(is_int($r))
			{
				return $r;
			}
			else
			{
				for($i = 0;$i<count($data); $i++)
				{
					$data[$i] = $r[$i];
				}
				return false;
			}
		}
	
	}

}

?>
Wait a few moments for me to find the rest, it was like 5 months ago i did it, and it saved me a shitload of Gigs... Just make step 1 first... Be right back
Need cola and chocolate first
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:46 PM   #10
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
Step 2, create a folder called "' cache "" and put it in the root, chmod it to 777
So folder name cache, and in 777 please

Now i need to find step 3, brb
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:52 PM   #11
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
Step 3 ...

Code:
<?
// CALL THE CACHING CLASS

require_once("cache.php");

// SET THE CACHING FOLDER PATH

$path = "./cache";
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$file = md5('index');

// SET THE EXPIRATION TIME (IN SECONDS)

$expire = 3600;
$cache = new Cache($path);

// START WRITING TO CACHE

while($cache->save($file,$expire))

{

?>

You place this CODE in your index.php

variable is $expire = 3600;
Higher number, good for high traffic volume
Lower Number, good for low traffic volume

NOW step 4

You place below code above the footer include.

Code:
<?

// FINISH WRITING TO CACHE

}

?>
This should do the trick

You can see the end result on www.SmutThumb.com, as you can see there, the index refreshes every 60 minutes. So the load is way more friendly.
This code is costume. It is made to solve the problem you run into now.

Kind Regards

Harry
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 04:55 PM   #12
d-null
. . .
 
d-null's Avatar
 
Industry Role:
Join Date: Apr 2007
Location: NY
Posts: 13,724
Quote:
Originally Posted by Sex2Have View Post

You can see the end result on www.SmutThumb.com, as you can see there, the index refreshes every 60 minutes. So the load is way more friendly.
This code is costume. It is made to solve the problem you run into now.

Kind Regards

Harry

nice site Harry, is that the only mod you have done to the TEVs platform on that site? looks like it is running good and I like your php redirect to the sponsor (is that a builtin feature of TEVS)?
__________________

__________________

Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
Check out the #1 WordPress SEO Plugin: CyberSEO Suite
d-null is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 05:08 PM   #13
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
Quote:
Originally Posted by d-null View Post
nice site Harry, is that the only mod you have done to the TEVs platform on that site? looks like it is running good and I like your php redirect to the sponsor (is that a builtin feature of TEVS)?
(is that a builtin feature of TEVS)? = yes
is that the only mod you have done to the TEVs platform on that site? = yes

The rest on Smut is just some japperdiejapp html work. Nothing impressive to be honest. The only reason i have a TEVS was to have all movies of all my sponsors on 1 place. Gathered 196,000 in 2 months time. Its a bitch to do this a second time....
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 05:27 PM   #14
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
Thanks. But correct me if I am wrong, this is still being created dynamically: http://www.smutthumb.com/video/BrookeSkyecom-269659/ ?

My main is static as I am using tgpx to list and rank the thumbs, TEVS to display the video the thumb links to. This is where I am having the trouble. If I sent 100k to dynamically created tevs main with 60 thumbs my box would melt, I solved that problem early with using tgpx to create the main.
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 05:35 PM   #15
Tjeezers
Webmaster
 
Tjeezers's Avatar
 
Industry Role:
Join Date: Mar 2007
Location: BP4L - NL/RO
Posts: 16,556
you can of course work on the code a little bit and also employ it on the deeper pages. For me the only needed gig chiller was needed on the index. You can also edit the pages and take the side elements out, or lower the amount of pictures you see on your right. If i would make it all static, the visitors would see every time the same related videos when it watches a movie 2 times. As said, when your a little bit handy, the entire TEVS can be made static. For me the need was not there. With TEVS the sponsors host the movies, so i would not be so unhappy to have 100K a day on it, i would optimize the php pages a little here and there, and 100K is easy to handle then. But heee.. im not a coder, i am more a simple webmaster.
__________________
Enroll in the SWAG Affiliate Asian Live Cam Program and get 9 free quality linkbacks from my network!
Wanna see how old school I am? Look at this! All my Cam Review Sites are here!

Last edited by Tjeezers; 11-11-2008 at 05:37 PM..
Tjeezers is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 05:36 PM   #16
Godsmack
Confirmed User
 
Industry Role:
Join Date: Apr 2004
Location: The Netherlands
Posts: 4,525
STXT outputs static
__________________
Download the much improved Free Tube Script adult/mainstream tube solution for FREE!
Godsmack is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 05:41 PM   #17
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
Thanks a bunch sex2have, Im gonna dick around with that code and see what happens.

Godsmack, if I cant get that code working you'll most likely be hearing from me shortly.
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-11-2008, 10:06 PM   #18
Zorgman
Confirmed User
 
Zorgman's Avatar
 
Join Date: Aug 2002
Location: Sydney, Australia
Posts: 6,103
I would have made a static version of TEVS but the fact that some webmasters have 200,000 + videos in their database, along with no real template system made me think twice about it.

I would say if the mysql queries are hurting, their is lots of code you can drop.
__________________
---
Zorgman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-12-2008, 07:58 PM   #19
Gambrinus
So Fucking Banned
 
Join Date: Jun 2007
Location: Prague
Posts: 740
I just wanted to drop back in here and say after further investigations by host it was determined that a bad mysql config was largely to blame for the crippling load. After being fixed the load isnt a third of what it was. Tits.

Sorry Zorg, didnt want you to think I was in here bagging your script. Im a big fan of it.
Gambrinus is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-12-2008, 08:18 PM   #20
Zorgman
Confirmed User
 
Zorgman's Avatar
 
Join Date: Aug 2002
Location: Sydney, Australia
Posts: 6,103
It's cool. Lots of different factors play with server loads.
I had one client back in Feb that was using tevs with 50,000 videos and 20k a day traffic. Told me the script was too slow. After looking at this server there was 500 other domains using tgp and blogs on the same database.

As long as it's fixed, it's all good. :D
__________________
---
Zorgman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-13-2008, 10:08 AM   #21
TDF
Triple OG nigga on GFY
 
TDF's Avatar
 
Industry Role:
Join Date: Mar 2002
Location: in the BP4L family compound
Posts: 27,296
tevs has excellent support and will help webmasters with the small nuances of the script
__________________
Sig heil

TDF is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.