Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Php / MySQL update script sending empty response

1 post in this topic


A couple months back, I made a quick script in PHP that takes values from a webpage, and inserts them into an SQL database. The script worked for a while, until recently when my web host upgraded to a new server. Now the script always gives me "(52) Empty reply from server" (using curl).

My knowledge on fixing these sorts of things is fairly limited, so I came here looking for any help or suggestions someone might be willing to offer. Thanks!

My script:

error_reporting(E_ALL | E_STRICT);
$max_execution_time = ini_get( 'max_execution_time' );
mysql_connect("localhost","myusername","mypassword") or die(mysql_error());
mysql_select_db("hlallian_rank") or die(mysql_error());
//After Connection
$result1 = mysql_query("SELECT name, rank FROM group") or die(mysql_error());
while ($row1 = mysql_fetch_array($result1, MYSQL_ASSOC))
$char = $row1['name'];
// echo "<br/>updating $char";
$searchStatus = getCharData($char, $charData);
$exppercent = sprintf('<br>%.2F', $charData['expPercent']).'%';
mysql_query("UPDATE group SET class='{$charData['jobImageURL']}', avatar='{$charData['characterImageURL']}', pet='{$charData['petImageURL']}', level='{$charData['level']}', exp='{$charData['experience']}', percent='{$exppercent}', rank='{$charData['rank']}' WHERE name='{$char}'")or die(mysql_error());
set_time_limit( $max_execution_time );

Updatesig.php contains the code that fetches the data from the website, using regular expressions and preg_match.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.