troubleshooting Question

Can we force from php page to free server memory?

Avatar of anamikamamidi
anamikamamidi asked on
Web Languages and StandardsWeb Development SoftwareScripting Languages
2 Comments1 Solution251 ViewsLast Modified:
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">

<title></title>
<style type="text/css">
<!--
body
{
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<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">
document.write(images[ndex]);
</script>
</body></html>
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros