Avatar of anamikamamidi
 asked on

Can we force from php page to free server memory?

Hi friends this is a tricky issue, I am not able to solve and seek some experts help in this regard. Please bear me for my long explanation.

My site name is AAA. And the publisher site name is BBB.
I created ad.php in the root of my website manually and put some html/javascript code which rotates 3 "400x50 " banners with some news items. I have this link (mysite.com/ad.php) to the publisher to display my ads in his website for some amount. The publisher is using iframes and displaying my page (ad.php) in that iframe. Then my ads display in his website and users click them and come to my website.

In nights my website is fast and in mornings due to the traffic it has become very slow and some times connection timed out.. Im suspecting some thing wrong iwth the javascript code im using for ad rotation, but same code is used from my friend in his website and is very good. But ofcourse a different webhost.

So, I am suspecting there might be too many instances problem or memory issue... so is there any way that i can release memory or free the variables im using in this below code to improve performance?

My website is a wordpress site. BUt the ad page i created manually from the root as ad.php. But the images which im using in that page are uploaded from wordpress admin in the media.  And using those path in the ad.php. plz see below code.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<style type="text/css">
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
<script language="JavaScript"><!-- 
//store the quotations in arrays

images = new Array(2);

images[0] = "<a href = 'http://mywebsite.com/2013/04/01/chiru-letter-azad' target='_blank'><img src='http://mywebsite.com/wp-
content/uploads/2013/04/een300apr12.png' border='0' alt='mywebsite.com'></a>";

images[1] = "<a href = 'http://mywebsite.com/2013/04/01/tdp-more-votes' target='_blank'><img src='http://mywebsite.com/wp-content/uploads/2013/04/tdp-eenadu.png' border='0' alt='mywebsite.com'></a>";

ndex = Math.floor(Math.random() * images.length);
// --></script></head><body>
<script language="javascript">

Open in new window

Web Development SoftwareWeb Languages and StandardsScripting Languages

Avatar of undefined
Last Comment

8/22/2022 - Mon
Dave Baldwin

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

The performance problem is with the host.  I assume this is low-cost or free shared hosting. Host offering such sites grossly oversell servers to be able to make a profit, and the result is that there are period of very poor response time and a high incidence of downtime.  You get what you pay for.  It the site is a serious enterprise then you need to move to higher quality host, or upgrade to a plan where you will be on a less congested server.

All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck