Jump to content

Cineex

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Everything posted by Cineex

  1. If you have access to it use CLI (Command line interface) it will always output what you echo/print and it won't wait for a buffer. Just remember to use "\r\n" insted of "<br>". on linux/mac: open terminal write: "php script.php" on windows... i hate windows at thease instances but if you need help with it just ask and i will try and help you.
  2. Thanks that was exactly what i needed, your explanation was good
  3. i'm write a function for it and i came across a error I never had befor: function trackerHash($infoHash) { $return = ''; $split = chunk_split($infoHash,2); $split = explode("\n",$split); array_shift($split); array_shift($split); array_pop($split); $i = 1; foreach($split as $value) { if($i == count($split)) $return .= $value; else $return .= $value . "%"; //exit(); $i++; } return $return; } this is the function now i try to call it by doing this: var_dump(trackerHash("0a32654838808aa26828dcdd526ad03ff7360382")); output: "82ing(71) "65 What is "82ing(71)" ????? and why dosen't it output it like 0a%32%65%48%38%80%8a%a2%68%28%dc%dd%52%6a%d0%3f%f7%36%03%82 I have tried printing the the array out and everything seams fine there... anyone have an ide ?
  4. it's an info hash from a torrent. The second one is what the program sends to the torrent tracker and the first one is the info-hash from a magnet link
  5. Im trying to get this: 3672E428DFE497D9DC10B054D2A49EF9F4CE010B to look like this: 6r%E4%28%DF%E4%97%D9%DC%10%B0T%D2%A4%9E%F9%F4%CE%01%0B anyone have an ide of a function that whould do this ?
  6. solved: found it by looking here http://www.phpfreaks.com/forums/index.php?topic=338952.0
  7. I have three tables that are linked together with IDs is it posebal to do one query that will fetch one thing from an other table then what I have info of. Like this: SELECT foo FROM table1 WHERE ID1=SELECT foo2 FROM table2 WHERE ID2=SELECT froo3 FROM table3 WHERE ID3='bar'
  8. I'm setting up a new web hotel where i am doing all the code my self. But right now i'm stuck on how the file system should work. First i thought of doing a vhost file for every host that register which would be nice because then you can have a lot of settings but then i would have to reload apache config after each config was mad or a cron job every 10 min or so and i don't want to do that. So instead i'm going with mod_vhost_alias. problem i have now is that i'm not sure how to setup the file system i want one user to be able to have more then one domain so i thought of doing something like: /websites/domain.com/subdomain (i.e www.example.com should go to "/websites/example.com/www/"). Then i should make a home for each FTP user like "/ftpuser/<username>/" and there put a symbolic link to each domain folder. But chroot jail won't work with symbolic links. any ides ?
  9. No, it should return all the models. Don't forget that if you are putting it into a varibal that you have to write $foo .= "<tr>something here asdkasdjk</tr>"; //NOT $foo = "<tr>something here asdkasdjk</tr>"; Don't miss the DOT "." .
  10. the add "ORDER MY milage" to the sql so it would look like this: SELECT * FROM model WHERE makeID='$id' DESC LIMIT 2 ORDER BY mileage
  11. i've never used the SoapClient extension so i'm not if your problem is there but I do know that if you have a space in front of the "extension=php_soap.dll" it can cause a problem.
  12. well you could get all the makes with one sql and then loop throw them with a query for each like this: $getMakesSQL = mysql_query("SELECT id FROM makes"); while($row = mysql_fetch_array($getMakesSQL)) { $id = $row['id']; $modleSQL = mysql_query("SELECT * FROM model WHERE makeID='$id' DESC LIMIT 2"); //create your table with thte output }
  13. dose the send_email function return true ? i.e do you get "Thanks for signing up. Please check your email for confirmation!" When you try it ?
  14. You could do: if(!isset($_SESSION)) session_start();
  15. Problem solved by adding the apache user to the shadow group. remember that you have to THINK before doing this because if a hacker finds a security hole he can easily get the shadow file.
  16. Could it also be that the user can't read the users home folder ? it's a php module to authenticate a user using linux system users
  17. I'm trying to create a php login using pam_auth but i get "Authentication failure" even tho i'm sure that the username and password dose exist. The funny thing is that one account is working (i'm not 100% sure if I've done something special with this account because this was that account i tested with from the beginning). Any suggestions or thought would be appreciated private function checkIfExsists($domain,$password) { if(pam_auth($domain,$password,&$this->error[])) { return $this->getUserId($domain); } else { print_r($this->error); // willl return Array ( [0] => Authentication failure ) exit(); } }
  18. That worked but do you know why ? Edit: nvm found it, putting: session_write_close(); just before the header and it worked, ty
  19. I can't see any problem there, how dose the HTML look like ?
  20. You mean like this ? <?php $result = mysql_query("SELECT * FROM players ORDER BY goalsscored DESC LIMIT 10"); echo "<table class='topscorers-table' cellspacing='0'> <tr> <th class='topscorers-name'>Name</th> <th class='topscorers-goals'>Goals</th> <th class='topscorers-pos'>Position</th> </tr>"; $i = 1 while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td class='topscorers-name'>" . $row['playername'] . "</td>"; echo "<td ' class='topscorers-goals'>" . $row['goalsscored'] . "</td>"; echo "<td class='topscorers-pos'>" . $i . "</td>"; echo "</tr>"; $i++; } echo "</table>"; ?>
  21. I have not tested it but it should work. This is just what i got out of my head right not . it's very dirty and i would not suggest using it if you have a lot of users. REMEMBER to check the terms for evil activity be for passing it to a function like this!!!! (sql-injection). function search ($term) { $idArray = array(); $i = 0; $info; $searchTerms = explode(" ",$term); foreach($searchTerms as $word) { $currentIdArray = array(); $wordsSql = mysql_query("SELECT id FROM table WHERE headline LIKE '%$word%'"); while($headline = mysql_fetch_array($wordsSql)) { $currentIdArray[$headline['id']] = $headline['id']; } if($i == 0) { $idArray[$headline['id']] = $headline['id']; }else{ if(!in_array($headline['id'],$idArray)){ unset($idArray[$headline['id']]); } } $i++; } $j = 0; foreach($idArray as $id) { $sql = mysql_query("SELECT something FROM table WHERE id='$id'"); $info[$j] = mysql_fetch_assoc($sql); $j++; } return $info; }
  22. I'm setting up my new live server using suPHP mod in apache but it dosen't seam to save session variables. If i do: session_start(); $_SESSION['foo'] = "foo"; $_SESSION['bar'] = "bar"; print_r($_SESSION); it will print out the sessions as it shoud do, but if i do session_start(); $_SESSION['foo'] = "foo"; $_SESSION['bar'] = "bar"; print_r($_SESSION); header('Location: otherpage.php'); and then on the other page do session_start(); print_r($_SESSION); some phpinfo(); session.auto_startOffOff session.bug_compat_42OffOff session.bug_compat_warnOffOff session.cache_expire180180 session.cache_limiternocachenocache session.cookie_domainno valueno value session.cookie_httponlyOffOff session.cookie_lifetime00 session.cookie_path// session.cookie_secureOffOff session.entropy_fileno valueno value session.entropy_length00 session.gc_divisor10001000 session.gc_maxlifetime14401440 session.gc_probability11 session.hash_bits_per_character55 session.hash_function00 session.namePHPSESSIDPHPSESSID session.referer_checkno valueno value session.save_handlerfilesfiles session.save_path/var/lib/php5/var/lib/php5 session.serialize_handlerphpphp session.use_cookiesOnOn session.use_only_cookiesOnOn session.use_trans_sid00
  23. Doing what you want isn't hard... if you just tell me witch piece of code dose the rendering of the result because i'm not going to read throw all of that to find it
  24. Foud it, if anyone else is looking for it: http://osflash.org/sabreamf
  25. I need to do a client for AMFPhP in PHP normally it's used as a gateway be twin a flash website and the back end. Anyone know a good place to start ?
×
×
  • 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.