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, 03:16 PM   #1
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   #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 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-19, 01:47 PM   #3
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   #4
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   #5
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
Old 2005-04-06, 01:12 AM   #6
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 all, just a simple question going back to phpadsnew. When setting up an advertiser & Campaign, what do you put for the basic information? Im reading through the manual and it states that it is used to send information to the contact. Trust me I know this may be a dumb question but it doesnt hurt to know the right answer. my guess is using your own email address and stuff.
Vox 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 03:41 AM.


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