Jump to content

RussellReal

Members
  • Posts

    1,773
  • Joined

  • Last visited

Everything posted by RussellReal

  1. ace, it doesn't HAVE to be, if the id corresponds to the result in the database, then it should work regardless.. do this noob <?php session_start(); require('connection.php'); $id = $_SESSION['move_id']; print_r(mysql_fetch_assoc(mysql_query("SELECT * FROM `abcxyz` WHERE `id` = '{$id}'"))); ?> and tell me what you get
  2. preg_replace("/\.\d{1,3}$/",'.xxx','123.230.192.222'); sorry.. use this instead
  3. preg_replace("/\.\d{1,3}$/",'xxx','123.230.192.222');
  4. I think whats happening, your script is rendering 'die' as a string not as a function, do die(mysql_error()); instead of die mysql_error();
  5. You just do like // put class here // replace 'the_text_field' with the name of the tags textarea $text = explode(' ',str_replace(array('\'','the','and','or',',',' '),'',$_POST['the_text_field'])); $tags = new TagCloud($text); echo $tags->get_cloud();
  6. Y use urls, why not just establish a socket connection between both servers and then just send data thru the socket
  7. you need to access the file with PHP, you can't direct your user's client to the file.. and it isn't that hard say its 1 directory back from the website's base directory you'd just do $filename = '../'.$filename; and then fopen, fread, and then set the mimetype of the document and I think its uhm application/pdf or sumfin like that, using header() for example header('Content-Type: Application/PDF'); and then echo all the data you got from the file into the page and then the page should either act like a download of the pdf file, or open it in the web browser acrobat reader addon thingy
  8. I just worked something out for you.. <?php // BY Russell Crevatas // CONTACT email/msn RussellonMSN@hotmail.com class TagCloud { private $tag_count = array(); private $tag_formatted = array(); private $min_size = 10; private $max_size = 40; public function __construct($tags) { foreach ($tags as $v) { if ($this->tag_count[strtolower($v)]) $this->tag_count[strtolower($v)]++; else $this->tag_count[strtolower($v)] = 1; } $this->format_each(count($tags)); } private function format_each($count) { foreach ($this->tag_count as $k => $v) { $m = ($v / $count); $s = ceil((($this->max_size - $this->min_size) * $m) + $this->min_size); $this->tag_formatted[] = "<span style='font-size: {$s}px; text-transform: uppercase;'>{$k}</span>"; } } public function get_cloud() { return implode(' ',$this->tag_formatted); } } $tags = new TagCloud(array('omg','lolwtf','omg','ffs','wtf','owned','ffs','omg','lmao','ffs','omg','rofl','omg','omg','omg')); echo $tags->get_cloud(); ?>
  9. just do base64 coz u can encode and decode or you could do some salted push algorithm
  10. SELECT * FROM error JOIN deals_models ON (error.model != deals_models.ModelID) WHERE `affiliate` = '$aff'
  11. mysql_real_escape_string() on it, name would be a string
  12. no, set up a server.. I released an opensource server script that you can turn your home computer into a server.. then simply start the server, and handle the connections and when sum1 sends a message, send it to the user associated with that message.. E.G. MSG UserName/Channel TI:ME:ST-A/M/P MSG TO SEND then just send it to them via their connection http://lovinglori.com/newServer.phps
  13. try doing this before the if statement do echo "<br /><br /><br /><br /><br /> HI!! <br /><br /><br /><br />"; and after the if do echo "<br /><br /><br /><br /> BYE!! <br /><br /><br /><br />";
  14. idk.. maybe all the data isn't filled out
  15. well, if they're not there.. than AJAX won't trigger, then they wouldn't get removed.. use ajax to keep updating the timestamp in teh database, and another time as the start time of the server, just make the table have 4 fields ip | randomly_generated_number | last_active | server and IP would be ofcourse their IP, randomly generated number would be a number randomly generated by the page, to know that they are the person who should be accessing that db entry, last active would be a simple timestamp, server would be true or false, being your server or not set server to some number in the past, and then do a query every request from the ajax like if (mysql_fetch_array(mysql_query('SELECT * FROM `table` WHERE `server` = true AND `last_active` < (UNIX_TIMESTAMP(NOW()) - (60 * 15))'))) { mysql_query('DELETE FROM `table` WHERE `last_active` < (UNIX_TIMESTAMP(NOW()) - (60 * 15)) AND `server` = false'); // clear up table }
  16. show the whole code, star out your passwords
  17. <?php $max_length = 240; $allowed = <<<ALLOWED @£$¥èéùìòÇØøÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !"#¤%&'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà^}{\[~]|€ ALLOWED; $allowed = preg_quote($allowed); if (preg_match("/^[".$allowed."]{0,".$max_length."}$/i",$text_msg)) { //go } else { //fail } ?>
  18. in your query.. mysql_query(....) or die(mysql_error()); that should explain your problem
  19. well, other than a session, some AJAX or a refreshing iframe every 15 minutes to tell your server they're active, and every 15 minutes clear ppl who havn't updated in 15 minutes, but sessions would most likely be better
  20. INSERT INTO `table_name` (`field1`, `field2`) VALUES('field1 data', 'field2 data')
  21. wildteen, either way, my 'html' is using css
  22. classes.. are designed almost specifically for this.. and include them as you need em lol and use require_once() that way if u accidentally try to include it more than once, it doesn't throw a fatal error for example: <?php if ($whatever == 'blah') { require_once('Blah.class.php'); $blah = new Blah($whatever); echo $blah->doWhateverWedNeedToDo(); } else { require_once('Main.class.php'); $main = new Main(); $main->formPage('Template.html'); } ?>
×
×
  • 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.