Greenguy's Board

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

Vox 2005-03-10 01:45 PM

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

Useless 2005-03-10 02:13 PM

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

Vox 2005-03-10 02:29 PM

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?

security_man 2005-03-10 03:16 PM

i would suggest phpadsnew :)

Useless 2005-03-11 09:02 AM

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:

$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.

ronnie 2005-03-11 01:29 PM

I give another plug for phpadsnew, totally awesome script. Been using it for a long time.

ronnie

Vox 2005-03-11 09:45 PM

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!! :)

Useless 2005-03-11 10:30 PM

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.

ronnie 2005-03-11 11:19 PM

For sure, it is amazing it is free, for all it can do.

ronnie

Vox 2005-03-12 01:18 AM

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?

Useless 2005-03-12 09:26 AM

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.

Lemmy 2005-03-12 12:43 PM

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... :D But be forewarned, it's a monster of a script.

cd34 2005-03-12 12:57 PM

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

Vox 2005-03-12 05:35 PM

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 2005-03-15 02:02 AM

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?

security_man 2005-03-15 02:08 AM

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 :)

Cleo 2005-03-15 12:37 PM

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.

Vox 2005-03-17 12:29 PM

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 ;)

Cleo 2005-03-17 12:36 PM

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.

Vox 2005-03-18 09:50 PM

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 2005-03-18 10:07 PM

yup it does display at random....jumped the gun on that question ;)

cd34 2005-03-18 10:21 PM

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.

amber438 2005-03-19 01:47 PM

Quote:

Originally Posted by Useless Warrior
Place this PHP statement on your page where you want your adverstising to appear:

$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?

Useless 2005-03-19 04:58 PM

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.

amber438 2005-03-20 10:49 AM

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
ban.php being the name you give the file

test page is here

kewlies..


All times are GMT -4. The time now is 12:50 AM.

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