Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 07-26-2010, 01:33 AM   #1
crazytrini85
Confirmed User
 
crazytrini85's Avatar
 
Industry Role:
Join Date: Jun 2006
Location: Over there.
Posts: 817
How to pull your URL into an Include?

I can do the date, time, IP address and all of that but have never been able to pull my URL into it.

Example, in my generic footer include I call the date and then the copyright info, but would also like to add the domain to it so I could have a totally generic footer include that I can drag and drop into any site.

Thanks ya.
crazytrini85 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-26-2010, 05:25 AM   #2
HomerSimpson
Too lazy to set a custom title
 
HomerSimpson's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
If you want just to show your site's url just use
Code:
echo $_SERVER['SERVER_NAME'];
but I'm not sure if I got you right: if you want to pull content from other site into your footer

PHP Code:
<?php include('http://www.yoursite.com/site.php');?>
but if your site is not allowing remote includes you should add this to the .htaccess
PHP Code:
allow_url_include 1 
or, if you prefer
PHP Code:
allow_url_include on 
if that is prohibited by your hosting provider, you should use cURL
(you can contact me and I can write that for you)
__________________
Make a bank with Chaturbate - the best selling webcam program
Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

Last edited by HomerSimpson; 07-26-2010 at 05:32 AM..
HomerSimpson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-26-2010, 05:32 AM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
not really wise to allow it for a server if you share it, but if its just your box, im pretty sure its ok
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-26-2010, 07:46 AM   #4
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
it's bad idea, use full path instead:
include('/home/bluh/bluh/footer.php');
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-26-2010, 07:51 AM   #5
crazytrini85
Confirmed User
 
crazytrini85's Avatar
 
Industry Role:
Join Date: Jun 2006
Location: Over there.
Posts: 817
Quote:
Originally Posted by woj View Post
it's bad idea, use full path instead:
include('/home/bluh/bluh/footer.php');
Why is it bad idea for not using full path? I've always used relative paths. Am I asking for trouble?


And thanks to the first poster, it is "echo $_SERVER['SERVER_NAME'];" I was looking for.
crazytrini85 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 07-26-2010, 08:09 AM   #6
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally Posted by crazytrini85 View Post
Why is it bad idea for not using full path? I've always used relative paths. Am I asking for trouble?


And thanks to the first poster, it is "echo $_SERVER['SERVER_NAME'];" I was looking for.
I meant instead of a url, relative path is fine too...
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.