![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Too many php includes on one server, is it possible?
I have a project I am working on, and a big part of the project is to have this
<a href='<?php include('http://www.domain.com/urlinc/file.php'); ?>'> everywhere there are thousands of them is this putting an extra load on my server? what is wrong with doing it this way? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Dec 2005
Location: Couch
Posts: 2,678
|
The only thing to keep in mind is it's an extra disk hit (hit to the page, and a hit to the include from the page that's calling it).
I use them all over the place on my sites and have yet to become spindle bound. The pro to using them is it's easy to centralize things (such as headers or metas) so that you can make a global change by editing one file. Personally, I highly recommend includes when appropriate, and it appears to me that your use is more than appropriate. The alternative would be to have thousands of individual files that contain the same thing your include has. Hope that helps. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
Is the urlinc/file.php file actually remote? I've met many webmasters who actually do this when the file/domain exists on the same machine.
If the file is actually remote, It would probably be better practice to configure a cron job to retrieve an updated version of the file every hour, and include the file locally. If the file isn't remote, you should not be charging money for your services.
__________________
If you won't feel as good, I won't feel as cheap. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
if you use:
include('http://www.domain.com/urlinc/file.php'); it will slow it down quite a bit, if possible I would use only local includes like: include('urlinc/file.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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
You could always chmod the file 755, and include the file via /home/username/public_html/urlinc/file.php . If you're running cpanel, you will have to add the other homedir to your list of openbasedir allowed paths, which is in httpd.conf .
__________________
If you won't feel as good, I won't feel as cheap. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
my main issue has just started tonight
it gives me some wierd error I have never seen before Warning: php_network_getaddresses: getaddrinfo failed: name or service is not known in....then it gives the file name and the line # I restart apache and everything works great again |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Too lazy to set a custom title
Join Date: Mar 2002
Location: Australia
Posts: 17,393
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
how will this benefit? just a more graceful way of doing it?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
btw, I have to say, gfy may be idiotic at time, but there are some really knowledgeable people around here, and I thank you all big time for it
![]() gfy has saved me from major issues so many times it isn't funny! haha |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
Quote:
This will definitely speed your script up though.
__________________
If you won't feel as good, I won't feel as cheap. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 | ||
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
the issue has started tonight Quote:
|
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | ||
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
Quote:
Quote:
__________________
If you won't feel as good, I won't feel as cheap. |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Masterbaiter
Industry Role:
Join Date: Feb 2006
Posts: 26,180
|
I use dreamweaver
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 | |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
Modifying httpd.conf is only to allow your script to access the file while it exists in another user's home directory.
__________________
If you won't feel as good, I won't feel as cheap. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
Quote:
Are you root? You have to be root to edit httpd.conf.
__________________
If you won't feel as good, I won't feel as cheap. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
the path of the actual files being included is: /home/newsfl/public_html/links/link.php and the path to the domains calling them varies, depending what I registered that day |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#22 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
and yes, I am root, but I have little experience working in ssh
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#23 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
mlove, are you a server tech, and if so, what do you charge? and do you have references?
I have little shit like this that pops up every once and a while, and I would love to have someone on icq that could work with me on it |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#24 | |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
Quote:
my aim is sdrawkcabyekim . No icq, email is [email protected] .
__________________
If you won't feel as good, I won't feel as cheap. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#25 |
Do Fun Shit.
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
|
You all patched up yet homes?
__________________
![]() “I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#26 |
the guy
Industry Role:
Join Date: Apr 2005
Posts: 764
|
I'm leaving for sleep. If you still need help, send en email and I'll get to it in the afternoon.
__________________
If you won't feel as good, I won't feel as cheap. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#27 | |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#28 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#29 | |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
![]() I will email you also, I would love to talk about what my best option is for this to keep my server load at the bare minimum I also want to speak with you about going through and optimizing my server |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#30 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#31 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
Hi Jace,
this really does not look the way you should be doing it. Why don't you just write a function in that .php file and include it only once? like this: Code:
<? include '/full_path/urlinc/file.php; ?> <a href="<?=get_url();?>">
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#32 |
Do Fun Shit.
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
|
__________________
![]() “I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#33 |
Dialer Kingpin
Join Date: Jun 2003
Location: New York
Posts: 10,816
|
I always wondered the same.
I have a few thousand pages using phpinclude, I never really noticed any problems. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#34 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#35 | |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
I have about 20k pages across 50 or so domains, all of them in about 20 niches....I need to call one single url php file to rotate urls on those pages consistantly why would I include it only once when I have 20 locations on the page I need those urls rotated? |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#36 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
You can rotate them in the function... As I understand you're always including the same .php, right? And this one .php does a rotation? Couldn't the function do the rotation? If you're including 20 different .php files, then disregard my previous message
![]()
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#37 | |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
__________________
hatisblack at yahoo.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#38 | |
MOBILE PORN: IMOBILEPORN
Join Date: Jan 2004
Location: Tinseltown NL
Posts: 16,502
|
Quote:
then have url.php have <?php $link[1] = "somelink.com"; header("location: http://" . $link[$QUERY_STRING]); ?> |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#39 |
So Fucking Banned
Join Date: Oct 2003
Location: In a house.
Posts: 9,465
|
madrox, he is trying to write the actual link rather than having a php call, it's all about making googlebot happy.
My question would be why not have your php module write the <a href part itself? then you could just call the module rather than calling inside of a link. That is very messy code. As others have mentioned, never use http:// inside an include. That means you server has to do a lookup (dns), make a connection (to itself, even worse) and use up available apache connection resources to serve you something that can be done directly in PHP without an issue. That will kill your server deader than a doornail in about 2 seconds if you get some hits on the page. Googlebot would be enough to make your server stop running. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#40 |
there's no $$$ in porn
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
|
1. use cron to create file-to-include.txt every hr.
2. use readfile() instead of include() to 'include' file-to-include.txt |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#41 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
all has been solved thank to munki
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#42 |
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#43 |
Do Fun Shit.
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
|
![]()
__________________
![]() “I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde |
![]() |
![]() ![]() ![]() ![]() ![]() |