Jump to content

Neptunus Maris

Members
  • Posts

    192
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Neptunus Maris's Achievements

Member

Member (2/5)

0

Reputation

  1. Zombie Apocalypse will happen http://rsurl.us/jw5p2 we did the math...
  2. Hi guys I'm new to XML-RPC and I'm having trouble trying to get XML-RPC to recognize my methods. Here is my function 'method': <?php function get_user_status($method_name, $params, $app_data) { global $db, $users; //output for return $op = ''; $op .= '<table border = "0">'; if (sizeof($params[0]) > 0) { foreach ($params[0] as $user) { $op .= '<tr> <td>'.$user.'\'s status:<br />'; $sql = "SELECT s.* FROM status s LEFT JOIN users u ON s.user = '".$users->id_by_username($user)."' ORDER BY post_date DESC LIMIT ".$params[1]; $db->exe_sql($sql); $op .= '<table border = "0">'; while ($row = $db->fetch_array()) { $op .= '<tr> <td><small>'.date('M d Y h:i a', $row['post_date']).'</small><br /> '.nl2br(stripslashes(htmlspecialchars_decode($row['status']))).'</td> </tr>'; } $op .= '</table>'; $op .= '</td> </tr>'; } } else { $op .= '<tr><td>You have no friends listed in this tracker.</td></tr>'; } $op .= '</table>'; return $op; } ?> And here is what I'm doing with XML-RPC in the same script: <?php $xmlrpc_server = xmlrpc_server_create(); xmlrpc_server_register_method($xmlrpc_server, 'get_status', 'get_user_status'); $request_xml = $HTTP_RAW_POST_DATA; $response = xmlrpc_server_call_method($xmlrpc_server, $request_xml, ''); header('Content-type: text/xml'); print $response; xmlrpc_server_destroy($xmlrpc_server); ?> I get these errors from an XML output: <methodResponse> <fault> <value> <struct> <member> <name>faultString</name> <value> <string>server error. method not found.</string> </value> </member> <member> <name>faultCode</name> <value> <int>-32601</int> </value> </member> </struct> </value> </fault> </methodResponse> I have no idea what I'm doing..I spent a whole day on Google, but found no quick and simple solutions. Thanks guys..
  3. Is this correct? <?php mysql_query("SOURCE file.sql"); ?> Is that correct to run a *.sql file on your server through PHP? Thanks, Neptune
  4. It all works now with the absolute path Example: I would change this blah.php to /blah.php in urls
  5. I know this is supposed to be in the Apache forum but no one's ever in there...really Anyways I'm doing a mode rewrite on a site like this: My URLs look like this: mysite.com/news/[newsID]/ (...so) mysite.com/news/3/ for instance... My .htaccess file is like this: RewriteEngine On RewriteRule news/([0-9]+)?.htm$ news.php?article=$1 [L] Now...the problem is, is that once I go to the page none of the CSS or HTML properties come through...no images nothing...how do I fix this? Thank you
  6. Can someone tell me how to properly use: sqlite_error_string() what goes in the parameter...i know its the error code...but what? Yes I did look at php.net for this...then google
  7. Indeed it is pefectly valid sytax to use... if ($exp) { // do something } else { // do something else. } Hmm....I've tried that before and got a similar error...thats why i thought it was invalid
  8. this is the problem in bold if ($stat[travelpass] <= N ) { Print "Dusty old man: You shouldnt be down here without a Travel Pass! Shoo, before i get you banned from here Completely!"; } else { Print "Dusty old man: Welcome the Safety Deposit Box Area, not many people come down here anymore.. Well then, Whats ya business?"; -------------- you can just have an "else" keyword on its own line...try this: } else {
  9. I've been on google for hours looking for a tutorial.
×
×
  • 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.