Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-03-10, 01:45 PM   #1
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
php help

Hello all! Im new here at greenguy & Jim.

Im doing some research for my site, and was looking on sublimepie.com, and would like to find out how they have the 4 pics at the top that have links but also rotate after a refreshed page with another set. I have been looking at random image scripts, but cant seem to find one that would handle more than 1 image shown at a time. Then I was thinking it was a banner and each image seperatly linked with hotspots or what have you, but now im thinking its a php script that displays random html? Could this be it?

Any help is greatly appreciated
Thank you
Vox is offline   Reply With Quote
Old 2005-03-10, 02:13 PM   #2
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Quote:
Originally Posted by Vox
...but now im thinking its a php script that displays random html? Could this be it?
Bingo: http://banners.sublimedirectory.com/mb/show.php?cid=15

Welcome to GG&Jim
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-03-10, 02:29 PM   #3
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
wow, ok awsome! ty warrior! Any idea on where to find a good php script for this? or basically a php script that can show anything i specify at random, including tables or banners?

I also noticed that the domain name is banners.sublimedirectory.com, is this where they just have the banners stored?
Vox is offline   Reply With Quote
Old 2005-03-10, 03:16 PM   #4
security_man
Are you sure this is the Sci-Fi Convention? It's full of nerds!
 
security_man's Avatar
 
Join Date: Jan 2004
Location: Texas
Posts: 260
Send a message via ICQ to security_man
i would suggest phpadsnew
__________________
<a href="http://www.linkalotapuss.com/home.php" target="_blank"><font face="Trebuchet MS">Linkalotapuss.com</a> - Submit your sites</font>

security_man is offline   Reply With Quote
Old 2005-03-11, 09:02 AM   #5
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Quote:
Originally Posted by security_man
i would suggest phpadsnew
So would I. Once you get the hang of phpadsnew you can control an amazing amount of advertising with it.

But if you are looking for something simple that doesn't require databases, you can employ a tiny script that I found here at GG&Jim's.

Place this PHP statement on your page where you want your adverstising to appear:

<?php
$file = "bannerlist.txt";
$banners = file($file);
srand((float) microtime() * 1235689);
$selected = array_rand($banners);
$SelBanner = trim($banners[$selected]);
if ($SelBanner=="") {
$SelBanner = trim($banners[0]);
};
echo $SelBanner;
?>

You'll notice that it pulls it's info from a file called bannerlist.txt. So make a text document with that name and upload it to the same directory as the page with the PHP code above. Put each separate banner, text link, or whatever on its own line. It can pull in entire tables, just make sure you get rid of any carriage returns so that the entire table is on one line on bannerlist.txt.

Each banner or link will appear randomly with each page refresh. Here's a page that uses that code to control the banners before the listings: http://www.filthyearl.com/hot-babes/
This is the bannerlist.txt for that page:
http://www.filthyearl.com/hot-babes/bannerlist.txt

And to answer your question about where to store banners, be creative in naming your banner directory or place them any image folder. You really shouldn't use the term 'banner' in your exposed page code. A lot of surfers are using ad blocking software that will block any image or link with that term.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-03-11, 01:29 PM   #6
ronnie
Wheither you think you can or you think you can't, Your right.
 
Join Date: Jun 2004
Location: midwest
Posts: 2,274
Send a message via ICQ to ronnie
I give another plug for phpadsnew, totally awesome script. Been using it for a long time.

ronnie
ronnie is offline   Reply With Quote
Old 2005-03-11, 09:45 PM   #7
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
guys I thank you very very much for the help, you have been great!! Its good to find a board where you can get help instantly. I look forward to my stay here at GG & Jim!! Im not much of a programmer but i have downloaded phpadsnew and will read all documentation and give it a shot. Im assuming that phpadsnew will do everything that you have mentioned in the php code you provided warrior? probably a stupid question and you should change your name, not by any means are you useless!!
Vox is offline   Reply With Quote
Old 2005-03-11, 10:30 PM   #8
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Phpadsnew will do much more than that little code I posted. It's one of those scripts that, when you log in to the admin for the first time, you'll be amazed that it's free. If you run in to trouble you can typically get some help with it here. There are a few posters here that run and know phpadsnew damn well. I should get off my lazy ass and install it on Filthy Earl and re-install it on Whoring Wives.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-03-11, 11:19 PM   #9
ronnie
Wheither you think you can or you think you can't, Your right.
 
Join Date: Jun 2004
Location: midwest
Posts: 2,274
Send a message via ICQ to ronnie
For sure, it is amazing it is free, for all it can do.

ronnie
ronnie is offline   Reply With Quote
Old 2005-03-12, 01:18 AM   #10
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
One quick question before i attempt to install this baby! I read in another post on the boards that it can suck alot of juice from your server. being as how Me and my partner are getting ready to launch our first site, we didnt go nuts on a hosting package, the one we went with is webairs starter package. Would you think this is sufficient to run phpadsnew?
Vox is offline   Reply With Quote
Old 2005-03-12, 09:26 AM   #11
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
Vox, back when WhoringWives was on a virtual account I ran phpadsnew on it without any complaints from my host. How much of a resource hog it could be, would be dependent on your traffic and brand new site probably isn't going to pull down the amount of traffic that is going to cause any issues. Personally, I wouldn't worry.

Does Webair really charge $49.95 per month for Cpanel? I've only ever seen dedicated servers charge for Cpanel. As a price comparison, on my dedicated server I pay $25 per month for Cpanel/WHM with Fantastico.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-03-12, 12:43 PM   #12
Lemmy
You can now put whatever you want in this space :)
 
Lemmy's Avatar
 
Join Date: Sep 2004
Location: Next door to a kid with a moped.
Posts: 1,492
Just installed phpAdsNew myself and it was a breeze. Figuring out how to set everything up and actually make it work with my LL script is another story.

I've only played with it since yesterday though so I might still get the hang of it... But be forewarned, it's a monster of a script.
__________________
BUY MY PORNSITES!
Lemmy is offline   Reply With Quote
Old 2005-03-12, 12:57 PM   #13
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Somewhere on this board, Cleo has a fairly informative document about phpadsnew. I did some cursory searches, but I thought there was a longer document somewhere.

http://www.greenguysboard.com/board/...ight=phpadsnew
http://www.greenguysboard.com/board/...=1934#post1934
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-03-12, 05:35 PM   #14
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
then i will give it a shot and see if i can figure this out. yes unfortunatley webair does charge that much for cpanel, but i opted not to go with it. There control panel is also great. Other than that the company has been awsome so far... I have no complaints and they have awsome support.
Vox is offline   Reply With Quote
Old 2005-03-15, 02:02 AM   #15
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
Hey everyone. I have this thing installed and have been reading, but this program has really thrown me for a loop and have no idea where to begin for the direction I am trying to use it for. Can anyone give some pointers as to what I should do?
Vox is offline   Reply With Quote
Old 2005-03-15, 02:08 AM   #16
security_man
Are you sure this is the Sci-Fi Convention? It's full of nerds!
 
security_man's Avatar
 
Join Date: Jan 2004
Location: Texas
Posts: 260
Send a message via ICQ to security_man
basically i set it up as the spnosor is the adveratiser so click on add advratiser and follow the set up for it. then each campaign is one of that sponsors sites. then you go in and put the banners you want for that site... this is basically the database from which you get the ads for the various publishers and zones.

your publishers are your sites or niches or whatever you want to set them up as. within them you have your zones which is specific pages or banner sizes or whatever and they will have specific banners from the adveratisers and campaigns you set up first.

once you have your zones filled with the banners you want to show then you get the invocation code and paste it on the page you want the banners in that zone to show up on.

theres lots more to it than that but thats a starting place at least
__________________
<a href="http://www.linkalotapuss.com/home.php" target="_blank"><font face="Trebuchet MS">Linkalotapuss.com</a> - Submit your sites</font>

security_man is offline   Reply With Quote
Old 2005-03-15, 12:37 PM   #17
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Here is that post,
Quote:
I have a whole lot of niches so it would a little different then how a niche specific list like your might do it. Also I have one horizontal banner spot and two vertical spots per page.

I add one or two banners per niche per sponsor. I just keep on adding them in as I join new sponsors. Once in awhile I'll go in and start pulling sponsor's banners if I don't them pulling in sales, but I'l leave them in there for a very long time before pulling something. Mostly I try to have a lot of variety on banners with different sale approaches per niche. I do often do an ad for the horizontal spot and then using that banner as my template I make up a vertical ad for the same site.

I have folder on my server that I make up one page per sponsor and on that page I put all of that sponsor's ads that I will add into the banner rotator. It makes for an easy copy and paste of code. Like on this page http://cleos-porn-links.com/a/wepayyou/

I made up one Campaign per niche per horizontal or vertical placement so I have two Campaigns per niche.

I also made up two Zones, one horizontal and one vertical, that I use for my main pages and any page that isn't niche specific. I can then add in ads from the Campaign as I feel appropriate, usually more mainstream porn for the horizontal spot and just about everything in the vertical spots.

About the only thing I don't like about my system is that if I get a banner that is appropriate for more then one niche I have to duplicate it and move it into that niche. Not a big deal, but more work later on if I decide to edit or pull that ad since there will be more then one copy.

It's nice being able to go to my Inventor screen as see exactly what ads are where per niche, this is absolutely fucking fantastic!!! Also viewing by Banner overview screen is great for a fast visual of what ads are showing where and in what niche.

I also made up a few different Advertisers so I have one for surfer ads, one for webmaster ads, etc. In my last banner rotator I mixed all the ads together and it became overwhelming have so many different ads geared to different audiences all mixed together.

Once I have enough ads in my database I may start using the feature that allows me to show different ads to different surfers based on what country they are coming from. From what I can tell this is a $150 per year fee to be hooked into the database. Imagine serving up the correct banners in the correct language that offered the correct type of program for that surfer. I'm going to need a whole lot more ads in my database to do this.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-03-17, 12:29 PM   #18
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
Sorry everyone for being such a pain, but Im still lost when it comes to this. It seems like an awsome program and would like to get to know it. Everything you have posted has been informative but the way you describe yourselves using PAN is for 1 specific banner. The banners i am trying to integrate is like the ones used on sublimepie. I will have a total of 3 photos each one for a different website and not one specifically. this is what i am trying to figure out. I dont get how you assign campaigns and zones and then enter in the HTML code to display my tables with the 3 image links. Once again i do appologize i know Im a total noob! I will begin reading from the beginning again
Vox is offline   Reply With Quote
Old 2005-03-17, 12:36 PM   #19
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
You have to make at least one zone.

Fill this zone up with ads. In your case thumbs linked to a sponsor.

Get the invocation code for this zone and put this code on your page.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2005-03-18, 09:50 PM   #20
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
Wow! ok, I have it working. I do have another couple questions though. (probably more to follow ) but for now, what i did was create a campaign and then a zone, then linked the campaign to the zone, is that right? Second.. I added the html for each banner to the campaign, now does this display at random?
Vox is offline   Reply With Quote
Old 2005-03-18, 10:07 PM   #21
Vox
Aw, Dad, you've done a lot of great things, but you're a very old man, and old people are useless
 
Join Date: Mar 2005
Posts: 24
yup it does display at random....jumped the gun on that question
Vox is offline   Reply With Quote
Old 2005-03-18, 10:21 PM   #22
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
you can alter that by changing the weight of certain banners in the campaign. If I recall, a banner can belong to multiple campaigns, and an advertiser can manage multiple campaigns.

So, if you set the weight of your favorite banner to 3, and the rest are 1, then, your favorite banner will come up 3 times as frequently. Still somewhat random.

What I have done in the past is run a bunch of impressions, 5000-10000 of each banner, then, weed out the lower clicking ones. There is a better way to do this which I haven't engineered yet. After a while, you get a stack of banners that pull clicks. Then you can use that info when building galleries, freesites, etc. so that you know which banners pull better.

You can run multiple campaigns on the same page (i.e. your 'three' image scenario above), but, there used to be something called grouping that would prevent duplicate banners in different campaigns from being displayed in the same pageview. Or, you could manage it yourself by putting distinct banners in each campaign, and having each 'spot' be a campaign.

Once you play with it you'll start picking up the tricks.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2005-03-19, 01:47 PM   #23
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
Quote:
Originally Posted by Useless Warrior
Place this PHP statement on your page where you want your adverstising to appear:

<?php
$file = "bannerlist.txt";
$banners = file($file);
srand((float) microtime() * 1235689);
$selected = array_rand($banners);
$SelBanner = trim($banners[$selected]);
if ($SelBanner=="") {
$SelBanner = trim($banners[0]);
};
echo $SelBanner;
?>

You'll notice that it pulls it's info from a file called bannerlist.txt. So make a text document with that name and upload it to the same directory as the page with the PHP code above. Put each separate banner, text link, or whatever on its own line. It can pull in entire tables, just make sure you get rid of any carriage returns so that the entire table is on one line on bannerlist.txt.
If I wanted to use this to rotate just maybe 3-4 ads without using another phpads call, could it be used on shtml?
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Old 2005-03-19, 04:58 PM   #24
Useless
Certified Nice Person
 
Useless's Avatar
 
Join Date: Oct 2003
Location: Dirty Undies, NY
Posts: 11,268
Send a message via ICQ to Useless
That won't work on a shtml page. I'm not even sure how to modify it that one to make it function that way.
__________________
Click here to purchase a bridge I'm selling.
Useless is offline   Reply With Quote
Old 2005-03-20, 10:49 AM   #25
amber438
Whatever don't kill ya makes ya stronger...
 
amber438's Avatar
 
Join Date: Apr 2003
Location: New York
Posts: 820
Send a message via ICQ to amber438
Well, Iit took me hours but I figured it out for shtml..I am a script idiot but I did it!!
make a php page with the script. make a text file called bannerlist,txt or you can change it
then include it on your shtml with
<!--#include virtual="ban.php"--> ban.php being the name you give the file

test page is here

kewlies..
__________________
Red Hot Links
Red Hot Galleries
amber438 is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:18 AM.


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