Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2012-01-29 07:47:30

Eri
Member
Registered: 2011-03-18
Posts: 977

[Idea] SQL 350MB with embeded videos

I have a site that embed videos from other sites. The problem is that the SQL is 350MB and i have only 400k videos.

As i can see from the code every site has a video ID.

To reduce SQL size it will be great if we do not copy the embed code.

an example is having a php file with all the sites embed code that script support. That first will search site and then will add the ID.

Example if we have a video from pornhub.com with ID 12345: http://mysite.com/embed/video.php?site=pornhub?id=12345

- This will reduce more than 40% the SQL size.
- Site speed
- We can change the video width and height every time we want
- If a site makes a change in his embed code, we can change it quickly
- User will embed videos with our site URL to other sites ( we can ad pop under as xvideo do )

Last edited by Eri (2012-01-29 07:54:41)


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#2 2012-01-29 08:57:56

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [Idea] SQL 350MB with embeded videos

Dude you are so fucking SMART smile))) Its a very good idea. This is a database with 1.2 mil videos 1.5G tubefoo. Ok...so i need a new video column, embed_id, which will contain the parent site and a template for each site's embed code. After i finish 1.0 i will add this in 1.2


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#3 2012-01-29 09:19:45

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: [Idea] SQL 350MB with embeded videos

Thanks smile

As i can see the embed script copy the video URL to prevent duplicate content. With this URL has all the info to make the embed code. Site name and ID


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#4 2012-01-29 09:50:28

ful2fun.com
Member
From: Usa
Registered: 2011-09-16
Posts: 1,048
Website

Re: [Idea] SQL 350MB with embeded videos

Eri wrote:

I have a site that embed videos from other sites. The problem is that the SQL is 350MB and i have only 400k videos.

As i can see from the code every site has a video ID.

To reduce SQL size it will be great if we do not copy the embed code.

an example is having a php file with all the sites embed code that script support. That first will search site and then will add the ID.

Example if we have a video from pornhub.com with ID 12345: http://mysite.com/embed/video.php?site=pornhub?id=12345

- This will reduce more than 40% the SQL size.
- Site speed
- We can change the video width and height every time we want
- If a site makes a change in his embed code, we can change it quickly
- User will embed videos with our site URL to other sites ( we can ad pop under as xvideo do )



I have Seen Same Thing In Some TGP Sites They Redirect There Site With Other Embedding Sites But The Templates Remain Same.They DO Not Store Embedding code.
example Is You can See Free TGP Site.
xsharebox.com.

And symtab Bro You Are Planning For Making TGP Site You Can take Help From There TGP Script inxy-scripts.com



ful2fun.com
livesexpirates.com

Offline

#5 2012-03-16 10:09:22

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: [Idea] SQL 350MB with embeded videos

Is there a way having this in version 1, because my SQL database gets always crashed and and site is very slow "freepornscan.com". The only way to run the SQL perfect is x3 RAM  this means 120$ monthly more for a site that gets 70$ monthly.

Last edited by Eri (2012-03-16 10:10:08)


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#6 2012-03-16 10:25:03

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: [Idea] SQL 350MB with embeded videos

Use sphinx to run the site it will work very fast. I cannot add in 1.0 without delaying again.


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#7 2012-03-16 10:32:44

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: [Idea] SQL 350MB with embeded videos

site is running with sphinx


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#8 2012-03-22 10:17:40

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: [Idea] SQL 350MB with embeded videos

I'm trying to make the php file but I need some help because I am an accountant lol
I do not know why but i can not get info from database.

http://freepornscan.com/modules/video/p … ?id=471914

<?php
define('_VALID', true);
require '/var/www/vhosts/alotporn.com/httpdocs/libraries/bootstrap.php';

error_reporting(E_ALL);
ini_set('display_errors', 1);

$id 	= (isset($_GET['id'])) ? (int) $_GET['id'] : 0;
if ($id === 0) {
	die('Invalid video id!');
}
ob_start();
$db				= VF::factory('database');	
$sql				= "SELECT video_id, site, url
                          	  FROM #__video_graber
                          	  WHERE video_id = ".$id."";
         	          					
$site = $video_graber[site];
$url = $video_graber[url];


if ($site == xvideos) {
    $embed_id      = substr($url, 2, strrpos($url, '/'));
    echo "<iframe src=\"http://flashservice.xvideos.com/embedframe/.'$embed_id'.\" frameborder=0 width=510 height=400 scrolling=no></iframe>";
} elseif ($site == xhamster) {
    echo "a is equal to b";
} elseif ($site == alotporn) {
    echo "a is equal to b";
} elseif ($site == redtube) {
    echo "a is equal to b";
} else {
    echo "sponsorvideo";
}
VF::close();

?>

Last edited by Eri (2012-03-22 10:19:07)


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

#9 2012-03-22 11:42:55

THS
Member
Registered: 2012-02-02
Posts: 313
Website

Re: [Idea] SQL 350MB with embeded videos

I had the same problem.  Is your dataset always returning null?  If you look here:  http://forum.adultscriptpro.com/viewtopic.php?id=1202  Symtab posts some code to help debug.

Last edited by THS (2012-03-22 11:43:31)

Offline

#10 2012-03-23 11:31:52

Eri
Member
Registered: 2011-03-18
Posts: 977

Re: [Idea] SQL 350MB with embeded videos

Finally removed all the embed code from all my videos and site is much faster now.
and all videos work on my site smile))
here is the iframe php code.

<?php
define('_VALID', true);
require 'libraries/bootstrap.php';
error_reporting(E_ALL);
ini_set('display_errors', 1);

$id = (isset($_GET['id'])) ? (int) $_GET['id'] : 0;
if ($id === 0) {
	die('Invalid video id!');
}

$db = VF::factory('database');
$db->query("SELECT video_id, site, url
                          	  FROM #__video_graber
                          	  WHERE video_id = $id");


$site	= $db->fetch_field('site');
$url	= $db->fetch_field('url');


if ($site == 'xvideos') {
    $url  = explode('/', $url);
    $url = $url['3'];
	$url = str_replace("video", "", $url);
    echo "<iframe src=\"http://flashservice.xvideos.com/embedframe/$url\" frameborder=0 width=640 height=480 scrolling=no></iframe>";
} elseif ($site == 'xhamster') {
    $url  = explode('/', $url);
    $url = $url['4'];
    echo "<iframe width=\"640\" height=\"480\" src=\"http://xhamster.com/xembed.php?video=$url\" frameborder=\"0\" scrolling=\"no\"></iframe>";
} elseif ($site == 'alotporn') {
    $url  = explode('/', $url);
    $url = $url['3'];
    echo "<iframe width=\"640\" height=\"480\" src=\"http://alotporn.com/embed.php?id=$url\" frameborder=\"0\" scrolling=\"no\"></iframe>";
} elseif ($site == 'redtube') {
    $url  = explode('/', $url);
    $url = $url['3'];
    echo "<embed src=\"http://embed.redtube.com/player/?id=$url\" allowfullscreen=\"false\" AllowScriptAccess=\"always\" flashvars=\"autostart=false\" type=\"application/x-shockwave-flash\" height=\"480\" width=\"640\"/>";
} elseif ($site == 'madthumbs') {
    $url  = explode('/', $url);
    $url  = end($url);
    echo "<object id=\"MadThumbs_Player_EBVZuR6M\" type=\"application/x-shockwave-flash\" data=\"http://cache.tgpsitecentral.com/madthumbs/js/flowplayer/flowplayer.embed-3.2.6-dev.swf\" width=\"640\" height=\"480\"><param name=\"movie\" value=\"http://cache.tgpsitecentral.com/madthumbs/js/flowplayer/flowplayer.embed-3.2.6-dev.swf\" /><param value=\"true\" name=\"allowfullscreen\"/><param value=\"always\" name=\"allowscriptaccess\"/><param value=\"high\" name=\"quality\"/><param value=\"#000000\" name=\"bgcolor\"/><param value=\"config=http%3A%2F%2Fwww.madthumbs.com%2Fvideos%2Fembed_config%3Fid%3D$url\" name=\"flashvars\"/></object>";
} 
elseif ($site == 'empflix') {
                    $url  = explode('-', str_replace('.html', '', $url));
                    $url  = end($url);
    echo "<iframe src=\"http://player.empflix.com/video/$url\" width=\"650\" height=\"515\" frameborder=\"0\"></iframe>";
} else {
    echo $url;
}
VF::close();

?>

But it will be better to show those videos without the iframe and has this iframe if someone embde videos from our site so we can add advertisement on our iframe.

Last edited by Eri (2012-03-23 11:46:39)


Best Adult Affilitate Network:
ExoClick
Best Deals on Dedicated Servers - CDN
INXY

Offline

Board footer

Powered by FluxBB