Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   link randomizing (http://www.greenguysboard.com/board/showthread.php?t=2776)

lordaron 2003-12-02 12:36 PM

link randomizing
 
fuck, I've been looking everywhere for a simple link randomizer for my fake tgp, either they dont work or they plain old suck...all I need is something ultra small and simple that will shovel my links around a bit..no description no nothing...just switch the order a bit now and then...should be easy to find but noooo

so what do you guys use for your fake tgps ?

AcidMaX 2003-12-12 10:09 AM

Could easily be done with some php code, especially if its text links etc.

Let me provide something simple although this isnt tested but should work :)

PHP Code:

<?php
// FILE TO PULL FROM
$links_file "amateur.txt";

$links join(''file($links_file));
$alllinks split("\n"$links);

$random_link rand(0,count($alllinks));

list(
$link,$desc) = split("\|"$alllinks[$random_link]);

echo 
'<a href="'.$link.'" target="_blank">'.$desc.'</a>';


?>

Then in amateur.txt have a link|desc one per line something like:

http://www.url1.com|This chick is smoking hot
http://www.url2.com|This chick is also hot


Like I said I havnt tested the code, but I think that will work, it will just pull a random line from the text file, split the url & description on the | and spit it out.

Hope that helps.

Andy

Cleo 2003-12-12 10:15 AM

This is what I use
http://www.atoscripts.com/products.php?productId=1

Best money that I have ever spent.

I've got thousands of galleries in there and growing each week.

Bill 2003-12-26 11:59 PM

Cleo, I've been going thru atoscripts website descriptions of this script, I was thinking it might be good to ask a user this question.

Can you install the script on a server and use it to serve links on multiple domains? so as to have a rotating updateing gallery list on dozens of domains?

Ramster 2003-12-27 12:19 AM

You can get a free one no problem. I use one now for a few moch TGPs. Got it from Porno Payouts I believe if you use them as a sponsor.

And Bill, I don't think you can do that but I'm guessing of course. LOL

Ramster 2003-12-27 12:26 AM

Here, this will work.

Save this as galleries.php

$fileName = "./galleries.txt";
mt_srand( (double) microtime() * 1000000 );
$a = file($fileName);
$randNum = mt_rand( 0, sizeof($a)-1 );
header( "Location: ". $a[$randNum] );
?>

Then create a txt file loaded with galleries one line at a time. And use yourdomain.com/galleries.php as the link and it will pull a gallery from that text file. It pulls a random gallery so if you have 200 in there chances are the surfer will not see the same gallery for some time.

I use it here:
http://www.free-porno-mpegs.com/

Bill 2003-12-27 01:42 AM

Ram, the effect on that site is a good one, and I'll remember that, but I'm intrigued by the code that acidmax put up, because what I'd ideally like to do is have a script that printed a random gallery link with a few words in the text link, like "15 blowjob pics", "15 hardcore latina pics". "15 amateur sex pics" .

I tried the acidmax code, but it's not behaving as I expected. Course, I know hardly anything about php.

I'm looking thru a PHP tutorial now, things may become clearer to me.

Bill 2003-12-27 05:08 PM

So, are there any PHP or SSI or script people who can point me in the right direction to accomplish the following:

I want to be able to dynamically write to an html page a list of links in the form of a random hard link with description text in the link. I'd like to be able to draw the links from a text file.

Bill 2003-12-29 03:11 AM

Okay, so it looks like what I want to do is use SSI to write the results of a simple php script into an html page. Could use javascript, but SSI seems more reliable to me. I haven't tried this yet, still mostly studying so far.

Acidmax, can you confirm that the few lines of code you wrote will work? I'm getting errors trying to get it to write to a .php test page.

Cleo, if you read this, I'm still interested in learning more about the capabilities of the ATO gallery admin.

Any PHP or SSI people who have any ideas on how to make a gallery rotation/randomization system that writes descriptions to a page, I'd like to hear about it.

xxxjay 2004-01-16 03:45 AM

the ATO script rules

Bill 2004-01-16 04:57 AM

It took the ATO guys a bit to get back to me, holidays and all I gather, and what they said was that the script can write to any domain on the same server as itself. So it's not quite as universally flexible as I had hoped for, but I think I'll get it anyway and use it to provide content for a bunch of domains I have on one natnet server. It doesn't cost that much, and the cost includes the install, which will save me some time.

I'm still studying the PHP question, in my spare hours. It's a shame there's not more coder types here to answer questions.

urb 2004-01-16 05:57 AM

PHP Code:


<?
$day 
date("z");
include (
"galleries/$day.php");
?>

This is from a really simple site I did once, with a folder called galleries which included 366 files each containing 20 reviewed hosted galleries.

In a format like this
PHP Code:

<?php
   $today 
date("d-M");
   print 
"$today";
   
?> ~ <a href="http://galleries.whatever.com/?422">Hardcore gallery description</a>

Each set of 20 would be on a page called...

0.php
1.php
>>
365.php

It ain't the best way of doing it, but it works.


All times are GMT -4. The time now is 08:51 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc