Jump to content

My WebHostingPad Server is Blocking Me


FastbackJon

Recommended Posts

I have found that when I go to a page on my website, it can cause my IP to get blocked for 1/2 hour by their servers. I have confirmed this by using a proxy to see the site is still up and running. I contacted tech support for the server and after hours and hours of not being able to identify the issue, their tech support accused me of writing bad PHP code. The code has not changed, and this has been a recent issue with the server (last few months).

 

The web page queries a SQL database and displays many small thumbnails. So I took the code from that page, trimmed it down to just get the contents of the image directory and display the thumbnails. Very basic, whereas before it queried the database for specific images, and created thumbnails on the fly. And so the very basic page (link below) without all that extra stuff STILL causes my IP to be blocked from the site when I access the page.

 

http://www.1966-67chargerregistry.com/gallery/indexTest.php

 

Can you guys confirm that it's not a coding issue? Sure I could split up the images onto multiple pages, but there should be nothing here that a decent server can't handle, right? All thumbnails are 2-3 kb and there's typically maybe 1000 of them.

 

Thanks!!!

 

Re-factored PHP code below:

 

<html>

<head><title></title></head>

<body>

<table align="center" width="1000">

<?php

 

//get contents of image directory so we can look for existing images later in loop

$filePath = '../66pics/seppics';

$imageFiles = scandir($filePath);

$output = '';

$added = 0;

 

//walk through each of the directory image results

for($i = 0; $i < count($imageFiles); $i++)

{

//only display thumbnail images

if(substr($imageFiles[$i], 0, 1) == 'T' && strlen($imageFiles[$i]) > 10)

{

//save each image in a table cell to write out later

$output .= chr(13).'<td><center><img src="'.$filePath.'/'.$imageFiles[$i].'"></center></td>';

$added++;

 

//write out 7 pictures on each table row

if($added%7 == 0)

{

echo chr(13).'<tr>'.$output.chr(13).'</tr>';

$output = '';

}

}

} //end for loop

 

//output final incomplete line

if(strlen($output) > 0)

{

echo chr(13).'<tr>'.$output.chr(13).'</tr>';

}

?>

</table></body></html>

Link to comment
Share on other sites

Well I decided to "View Source" on the php output since it's just outputting HTML. I can save the source showing all the images and the rows in an .html file, then upload that, and access that to see if the problem keeps happening. That way I can rule out PHP and "critically bad coding" as one tech support admin put it, all together.

 

Web Hosting Pad is terrible.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.