NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Help needed, possibly with ASP.

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 02-24-2007, 08:02 AM THREAD STARTER               #1 (permalink)
Senior Member
Join Date: Dec 2004
Location: Burlington, Vermont
Posts: 1,048
dan_Vt is a jewel in the roughdan_Vt is a jewel in the roughdan_Vt is a jewel in the rough
 



Help needed, possibly with ASP.


I have a site with a number of pages, and want to sell a banner ad on each page (not separately, just one package deal). Instead of having to go through and update each page every time I sell the space, I would like to have code on the pages that pulls the ad (the image, url to link to, alt tag, title tag) from another file. I don't want to use an iframe because that would lessen the value of the banner because it wouldn't look like a link to the search engines, and iframes aren't great for SEO anyway.
????: NamePros.com http://www.namepros.com/programming/298059-help-needed-possibly-with-asp.html

I think the above can be done with ASP, but I'm not sure how.

Rep for the one who can solve my problem.

Update:

Would an Ajax include script do this? I know it would load the info, but would also have to appear like it's actually on the page it is being loaded to by the search engines.
__________________
Vermont SEO
Tool Band Forum

For Sale: Co-Sign.com
dan_Vt is offline  
Old 02-24-2007, 08:38 AM   #2 (permalink)
Senior Member
Join Date: Dec 2006
Location: England
Posts: 1,568
Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Originally Posted by dan_Vt
I have a site with a number of pages, and want to sell a banner ad on each page (not separately, just one package deal). Instead of having to go through and update each page every time I sell the space, I would like to have code on the pages that pulls the ad (the image, url to link to, alt tag, title tag) from another file. I don't want to use an iframe because that would lessen the value of the banner because it wouldn't look like a link to the search engines, and iframes aren't great for SEO anyway.

I think the above can be done with ASP, but I'm not sure how.

Rep for the one who can solve my problem.

Update:

Would an Ajax include script do this? I know it would load the info, but would also have to appear like it's actually on the page it is being loaded to by the search engines.
There is no such thing as a ajax include, ajax is simply javascript which will make a "on the wall" request to a server side page.
????: NamePros.com http://www.namepros.com/showthread.php?t=298059

Anyway, all you want here is a simple php include, asp will also do this but php is more widely supported.

PHP Code:
<?php
include 'file.extension';
?>
Hope that helps.

Matt
Last edited by Matthew.; 02-24-2007 at 08:48 AM.
Matthew. is offline  
Old 02-24-2007, 08:44 AM THREAD STARTER               #3 (permalink)
Senior Member
Join Date: Dec 2004
Location: Burlington, Vermont
Posts: 1,048
dan_Vt is a jewel in the roughdan_Vt is a jewel in the roughdan_Vt is a jewel in the rough
 



Matt,

Awesome, and this will make the link appear as if it is on the page to the engines?

-- rep on its way.

D
__________________
Vermont SEO
Tool Band Forum

For Sale: Co-Sign.com
dan_Vt is offline  
Old 02-24-2007, 08:48 AM   #4 (permalink)
Senior Member
Join Date: Dec 2006
Location: England
Posts: 1,568
Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Originally Posted by dan_Vt
Matt,

Awesome, and this will make the link appear as if it is on the page to the engines?
????: NamePros.com http://www.namepros.com/showthread.php?t=298059

-- rep on its way.

D
No adverse SEO effects what so ever. PHP is serverside therefore the included file is physically included where you select it to be before any output is made to the client.

Thanks for the rep btw

edit: Remember your file needs to be a *.php or you need to add a .htaccess rule to allow php to parse in *.htm(l) files.

Matt
Matthew. is offline  
Old 02-24-2007, 08:51 AM THREAD STARTER               #5 (permalink)
Senior Member
Join Date: Dec 2004
Location: Burlington, Vermont
Posts: 1,048
dan_Vt is a jewel in the roughdan_Vt is a jewel in the roughdan_Vt is a jewel in the rough
 



The files already are php, so that's good.

One last question (though that's not a promise): I want to have the file that is pulled be only the size of the image (so 468x60). How do I get it to show appropriately like that?
__________________
Vermont SEO
Tool Band Forum

For Sale: Co-Sign.com
dan_Vt is offline  
Old 02-24-2007, 08:56 AM   #6 (permalink)
Senior Member
Join Date: Dec 2006
Location: England
Posts: 1,568
Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
Originally Posted by dan_Vt
The files already are php, so that's good.
????: NamePros.com http://www.namepros.com/showthread.php?t=298059

One last question (though that's not a promise): I want to have the file that is pulled be only the size of the image (so 468x60). How do I get it to show appropriately like that?
The file will not technically be pulled like an iframe will, the file will be included into the file your include function is in. So a file with this in:

PHP Code:
<strong>Hello <?php include 'file.php'?></strong>
Assuming "file.php" contains:
PHP Code:
<em>Maverick</em
Will become:
HTML Code:
<strong>Hello <em>Maverick</em></strong>
Before the page's client side code outputted so to speak. So if your included page simply contains an IMG tag with the banner in, it will have the same affect as adding the IMG code into the first page (which will now contain the include function).

Hope that make sense, if it doesn't, since its sometimes hard to get things from explanations then give it a try

Matt
Matthew. is offline  
Old 02-24-2007, 09:02 AM THREAD STARTER               #7 (permalink)
Senior Member
Join Date: Dec 2004
Location: Burlington, Vermont
Posts: 1,048
dan_Vt is a jewel in the roughdan_Vt is a jewel in the roughdan_Vt is a jewel in the rough
 



Well, it makes sense but I'm getting an error:

Warning: include(/ad.txt) [function.include]: failed to open stream: No such file or directory in /home/encentra/public_html/hosting-guide.php on line 19

Any thoughts?
__________________
Vermont SEO
Tool Band Forum

For Sale: Co-Sign.com
dan_Vt is offline  
Old 02-24-2007, 09:04 AM   #8 (permalink)
Senior Member
Join Date: Dec 2006
Location: England
Posts: 1,568
Matthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud ofMatthew. has much to be proud of
 


Adoption Breast Cancer Breast Cancer Cancer Survivorship
The error means what it says

Quote:
Warning: include(/ad.txt) [function.include]: failed to open stream: No such file or directory in /home/encentra/public_html/hosting-guide.php on line 19
Remember that by adding the "/" to the start of the path you are making the path absolute, so it will be trying to find the file in the top most directory. If it is in the same folder, try removing the forward slash
????: NamePros.com http://www.namepros.com/showthread.php?t=298059

Matt
Matthew. is offline  
Old 02-24-2007, 09:10 AM THREAD STARTER               #9 (permalink)
Senior Member
Join Date: Dec 2004
Location: Burlington, Vermont
Posts: 1,048
dan_Vt is a jewel in the roughdan_Vt is a jewel in the roughdan_Vt is a jewel in the rough
 



Originally Posted by Matthew.
The error means what it says



Remember that by adding the "/" to the start of the path you are making the path absolute, so it will be trying to find the file in the top most directory. If it is in the same folder, try removing the forward slash

Matt
Yeah, I put it there so I can just copy it to other files that may be in other directories, but the file is a the top directory. I took out the slash and it works fine. I wonder why it didn't with the slash when that's where the file is...oh well.

Thanks again for your help.
__________________
Vermont SEO
Tool Band Forum

For Sale: Co-Sign.com
dan_Vt is offline  
Old 02-24-2007, 10:49 AM   #10 (permalink)
NamePros Regular
 
Jim_'s Avatar
Join Date: Aug 2005
Location: NY, USA
Posts: 610
Jim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to beholdJim_ is a splendid one to behold
 


Save The Children
It didn't work because you were trying to open /ad.txt instead of /home/encentra/public_html/ad.txt
__________________
ask me about the internet
Jim_ is offline  
Old 02-24-2007, 03:39 PM THREAD STARTER               #11 (permalink)
Senior Member
Join Date: Dec 2004
Location: Burlington, Vermont
Posts: 1,048
dan_Vt is a jewel in the roughdan_Vt is a jewel in the roughdan_Vt is a jewel in the rough
 



Originally Posted by Jim_
It didn't work because you were trying to open /ad.txt instead of /home/encentra/public_html/ad.txt
right back at 'cha.
????: NamePros.com http://www.namepros.com/showthread.php?t=298059










actually, thanks. I thought it would know the top was in public_html.
__________________
Vermont SEO
Tool Band Forum

For Sale: Co-Sign.com
dan_Vt is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 05:28 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger