Jump to content

NoMansLand

Members
  • Posts

    24
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

NoMansLand's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I've located the issue and resolved it It was a HTML issue and lacking the "../../" to signal to go back down a file or 3
  2. Hello All, I am working on a click function for jQuery & AJAX to submit data to PHP (The PHP has been confirmed to work, several times), The strange thing is, it works on one of the other pages, then stops working on this other one. Code: <?php $jid = $_GET['id']; $jusername = $_SESSION['MM_Username']; ?> <script> $(function() { $(".open").click(function() { var status = "Open"; var ticketid = "<?php print $jid; ?>"; var username = "<?php print $jusername; ?>"; var dataString = 'status='+ status + '&id=' + ticketid + '&username=' + username; $.post({ type: "POST", url: "core/ticketData.php", data: dataString, success: function(result){ alert('Success baby!'); $('.success').fadeIn(200).show(); $('.error').fadeOut(200).hide(); } }); return false; }); }); </script> Page: http://alpha.support.myfallen.net/scp/ticket/772 Username: TestDev Password: Test1234
  3. Hello, I am trying to find a character in my DB's. The DB has the data setup with +(number) & -(number) I want to try and find a way for PHP to seperate them into two so each one has the seperate colour's. i have tried preg_match, strstr & strpos but none of them seem to work. Can you as PHP Genius's help out? EDIT: Please Do Not Worry, I have fixed this. For people who were wondering: $new_variable = strstr($variable_to_check, "+"); if($new_variable == "") { do one you want } else { do what you want. } Thanks PHP Freaks Thanks, NoMansLand
  4. does the file songs/ exist? have you changed it to chmod 777? (linux) or full read & write from all?
  5. Hello, I am running this script: while($row = mysql_fetch_array($query)) { $compare_points_1 = $row['sideone_points']; $compare_villages_1 = $row['sideone_villages']; $compare_members_1 = $row['sideone_members']; $compare_points_2 = $row['sidetwo_points']; $compare_villages_2 = $row['sidetwo_villages']; $compare_members_2 = $row['sidetwo_members']; } $point_1 = $_POST['points_1']; $village_1 = $_POST['villages_1']; $member_1 = $_POST['members_1']; $point_2 = $_POST['points_2']; $village_2 = $_POST['villages_2']; $member_2 = $_POST['members_2']; $points_1_calc = $compare_points_1 - $point_1; $villages_1 = $compare_villages_1 - $village_1; $members_1 = $compare_members_1 - $member_1; $points_2 = $compare_points_2 - $point_2; $villages_2 = $compare_villages_2 - $village_2; $members_2 = $compare_members_2 - $member_2; When I try to output $points_1_calc it gives me: -100 It will Add & Times & Divide but not Subtract. Everything fills with Numbers only and I've tried this seperately and it works on a different script where I manually put in the numbers. All variables fill with numbers as I have a part above that doesnt go through if there is nothing to compare against. Any help would be greatly appreciated.
  6. im at my wits end here, How am i suppose to get this to work, with out fopen, any idea's?
  7. it is [-code] [/-code] Stupid TW.
  8. True, the "My Password Here" is for me to remove my password, would want some one to hack my account. But i cant see any missing '(s)
  9. Yes thats VCS Claim, The line is: curl_setop($ch, CURLOPT_URL 'http://en26.tribalwars.net/send_mail.php?from_id=152932&password=My Password Here f&to=$to&subject=$subject&message=$copyright$space$message$space$time$claimtime$space$coords$x$code$y$close$space$bpoints$points$space$thankyou');
  10. <?php mysql_query("INSERT INTO claim (x,y,name,points,claims,days,claimer) VALUES ('$x','$y','$name','$points','$owner','$claimtime','$claimee')") or die(mysql_error()); echo "<br />"; echo "Congragulations, This Village Is Now Yours<br />"; echo "You Now Have: <strong>" . $claimtime; echo " </strong>Days To Get it Before Your Claim Expires."; $to = $claimee; $subject = urlencode('Village Claiming System: Claimed Village'); $copyright = urlencode('[b]Do Not Reply To This Message, IT IS AUTOMATIC [/b]'); $message = urlencode('Thank you for using the [ally]Pure[/ally] Village Claiming System, Remember this is not a reserving System! '); $space = urlencode('[code] '); $coords = urlencode('Co-Ordinates: [village]'); $code = urlencode('|'); $close = urlencode('[/village]'); $bpoints = urlencode('Points: '); $thankyou= urlencode('Thank you for using the Village Claiming System, Please delete this claim, once you have captured this village.'); $time = urlencode('Days Until Claim Is Deleted: '); $base_url = "http://en26.tribalwars.net/send_mail.php?from_id=152932&password=dba0079f1cb3a3b56e102dd5e04fa2af"; // go to URL $ch = curl_init(); curl_setop($ch, CURLOPT_URL 'http://en26.tribalwars.net/send_mail.php?from_id=152932&password=My Password Here f&to=$to&subject=$subject&message=$copyright$space$message$space$time$claimtime$space$coords$x$code$y$close$space$bpoints$points$space$thankyou'); curl_exec ($ch); echo "<br />"; ?> [/code] The error im recieving now is: [Mon May 11 07:08:19 2009] [error] [client 58.161.150.45] PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/austchat/public_html/vcsclaim.php on line 117, referer: http://www.puredomination.org/check_claim.php But i've looked all through the code, and you guys seem to be a bunch of geniuses.. So thanks for your help
  11. This is my current code: My Current Error: MySQL server has gone away. so i have re-shuffled it. and i would love some ideas, to fix this error. <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://en26.tribalwars.net/map/village.txt'); $fp = fopen('village.txt', 'w'); /** * Ask cURL to write the contents to a file */ curl_setopt($ch, CURLOPT_FILE, $fp); /** * Execute the cURL session */ curl_exec ($ch); mysql_connect('localhost','********','***********') or die(mysql_error()); mysql_select_db('**********') or die(mysql_error()); mysql_query("TRUNCATE TABLE village") or die(mysql_error()); $lines = file('village.txt'); if(!is_array($lines)) die("File could not be opened"); foreach($lines as $line) { list($id, $name,$x, $y, $player, $points, $rank) = explode(',', $line); $name = urldecode($name); $name = addslashes($name); mysql_query("INSERT INTO Statement Here"); ?>
  12. Thanks Daniel0 your a legend, it now works. But one last question, would cURL be able to replace: $handle = fopen($base_url . "&to=$to&subject=$subject&message=$message$play$user$unplay$important$coords$x$code$y$close$space$info$newcount$space$end$space$ender", 'r'); im ready to kick my webhost.
  13. I have tried: file() gzfile() fopen() all closed. they recommended: file_get_contents() Tried it but still no luck. anyone with 3iX?
  14. Hello, I need something different from gzfile(), as my webhost has decided to disable it, So yeah 29% of my scripts now dont work.. i really want to kick them hard. Here is the code: $lines = gzfile('http://en26.tribalwars.net/map/village.txt.gz'); if(!is_array($lines)) die("File could not be opened"); foreach($lines as $line) { list($id, $name,$x, $y, $player, $points, $rank) = explode(',', $line); $name = urldecode($name) So i need to open that file, explode it.. blah blah blah, insert it into the database. So i need something new instead of gzfile()
  15. [Fri Feb 20 02:51:50 2009] [error] PHP Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/skyitorg/public_html/client/admin/view.php on line 146 This is all im getting.. any idea's? the code is here: $sql = mysql_query("SELECT * FROM receipt WHERE docket = '$docket'"); while($row = mysql_fetch_assoc($sql)) {
×
×
  • 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.