Jump to content

farnoise

Members
  • Posts

    54
  • Joined

  • Last visited

    Never

Everything posted by farnoise

  1. Hello All, I have a PHP application which goes through my tables in MYSQL does some cleaning once in a while (Updating record, removing, adding, and etc..) its a PHP application that I wrote uses loop and foreach and gets executed by CroneJob on my server every 4 ~ 6 hours ( twice a day). I haven't run the application for a long time but i am expecting my tables grow in rows in the near future. Here is some concerns that I have. I have set the execution time to 5 min, in my application I have a garbage collector and I make sure that every time a single row gets affected I free up the Variables, Sessions, and etc.. at the end of each process for the row then move to the next row and repeat... (so you see if I have 900 rows, it keeps executing few commands for each row frees up everything goes to the next row till the end stops). Do you guys see any problem with this?? Again as my rows are growing I prob need to increase the Exc time since my app already running for about 3 ~ 4 minutes... Do you see any problem? Any alternatives ?? My server is Linux, Should I get into Linux commanding itself rather than PHP? (I have very little knowledge on Linux) Oh, And if you think its ok as long as i free up memory in the function, is there a way that I force PHP time to MAX ? Thanks so much, sorry for the long post
  2. Hi, I am working on an application that sends request to few sites and shows the result on a a page which is separate from those host sites (it doesn't frame the results). So, to be more specific imagine expedia that takes user's query and cross checks with Airline websites and gets their fares and shows them on the result page. What I am thinking is getting those results from my host sites, compile them into an XML then show the result. Is there anyone that can direct me to the right direction?? Thank you so much
  3. Hi There, I am trying to this trick with PHP that get the last Value of the URL that the user enters in the Address bar in the browser (Not that that this is not a form) and use that value. for example I have a index page that starts with the code to do trick, then your comes to my website www.abcded.com/username So what I need to do is take the value which in this case is "Username" so I can use it, and as you know in normal case it will look for the folder called username under my root folder. Thanks,
  4. Hey Guys, I have a question here and I'm strugling with it, what I am trying to do is redirecting the user as soon as he opens the page to a HTTPS pagefor example. I have a really long URL for my email loginpage so instead of giving user long loink with port number and stuff I have this address "http://company.com/mail" and actualy under this mail directir there is a index.php with this code <?php header('Location: https://ssl.company.com/crm/webmail/this/location'); exit; exit(); ?> it works great but the problem is it send the user to the NONE-Secure page (HTTP) instead of the secure... Does anyone know how can I go around this?! Thanks
  5. Hi All, I'm trying to insert a HTML code into one of the fileds so when you load the page it reads that code and shows you the picture that code is pointing you as you can see below but the problem is I have too many " and ' s so PHP wont pass it. $name = $_POST['name']; $title = $_POST['title']; $ext = $_POST['ext']; $cell = $_POST['cell']; $sec = $_POST['sec']; $emp = $_POST['emp']; $con = mysql_connect("localhost","root","PA55ss"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("movedb", $con); $sql="INSERT INTO sheet1sa (ext, F2, cell, name, dep, F6, empno) VALUES ('$ext', '$sec', '$cell', '$name', '$dep', '<img src='./pics/$empno.jpg' width="80" height='90' />", '$empno')"; BTW i need to make this code so it takes the "empno" value and insert it into that code before .JPG so when browser reads my database it will read it as "./pics/777788.JPG" Thanks for your help
  6. Hey guys, I have a Joomla website that uses a really fancy template hence users with IE less than 7 are having lots of troubles, so now I'm looking for a script that detects user's browser and using IF statment let him pass or just show a error msg that your browser is not capable and suggest Google chrome or upgrade .. somthin like Youtube's Any help would be so much appriciated
  7. Hi I have this simple java that generates a SIN number, I wonder How can i transfer the Value to my PHP page that do the insert DB function, Right now I have user to copy / paste the value into the text box and I have to retrieve the text box value in my PHP page and use it as a PHP variable.. I hope I make sense <div align="right"><script language="JavaScript"> random_num = (Math.round((Math.random()*96120152)+90.83187)) document.write(random_num); </script> <input name="sn" type="text" id="sn" size="14" /> <br /> <span class="style20">(Copy & paste the number into this field)</span></div></td> </tr> <tr>
  8. I really don't know about those companies but I'm not looking for that kind of programs, what I need is a open source since I want to design a Video Conferencing for our company
  9. Nope! I tried video whisper wasn't too bad! but has lots of bugs.
  10. Sorry but if I'm not misunderstood, You mean why I'm not using PHP's send mail function? Well this is the main reason that I have this server up and running because we don't want to use outside sources and we don't want to open any port to outside word so I have this server up and running then we can have all transitions inside our network, And it's clearly visible that there is absolutely no security concern with this method but it's just the IT security Div, are overreacting. btw I guess I got my answer from your first post, I just need to clarify that this is not a SMTP service I really appreciate your helps Andrew and thanks again Arad
  11. I understand that is not a security concern but the problem is our company's IT HQ is asking us to shut down our Apache server, cuz they think this module is a security concern, plus the main reason that I started this server in my Division was I needed a mail() function to deploy couple emails everyday to some people. So now I have to come up with a report to prove that it's not a BIG DEAL really just a simple module Regards
  12. PS: I know its too much to ask but could you please provide any references and or reasons for your responds. Regards
  13. Hi, I have a quick question I hope you guys can help me, I'm writing a report on Tomcat and Apache server but there is something that I really don't know about. I wonder if anyone can help me the Security disadvantages of HTTPD.exe service on a local network(The network that is connected to the Internet through a Gateway imagine a big company's network), first of all can any one access my HTTPD.exe to send spam emails to the global address book and secondly what are the real critical risks of having this service unable on our network? Thank you all for you helps
  14. 1- I understood that I have to substitude but as You can see I dont need to direct them to any page simply want to SEND THEM BACK TO THE REFFERER LINK! 2- I NEED to show the message!
  15. Thanks for reply but there are 2 things! 1- what is NEW_PAGE.HTML I dont want to specify any page, I just want PHP to return the user to the page he was before Example: if someone is in the Index3.php page and clicks log out ==> Log him out show the log out message and take him back to Index3.php and if someone is in the Index2.php page and clicks log out ==> Log him out show the log out message and take him back to Index2.php 2- If I sepcify header in my file I cant hsow them logout messag, It takes user directlyto the header page Thanks
  16. Hi, I have a logout.php page that kills the cookies and logs out the user and here is the code. What I have here it transfers the user to the website main page using simple HTML tag to as you can see INDEX.PHP so I just wonder if anybody can tell me how can I modify this code the instead of transferring them to INDESX.PHP just kills the cookie and after showing them the message "You successfully logged out" transfer them back to the page they were before, Kind of transfer to the referrer link <meta http-equiv="refresh" content="4; URL=\index.php"> <?PHP session_start(); session_destroy(); ?> <html> <head> <title>You are Logged out</title> </head> <body> User Logged Out </body> </html>
  17. Hi everyone, I'm looking for a web based Video Conferencing program that use Flash or even PHP, I looked everywhere and 99% of them are FLASH but I couldn’t find any open source program and most of them are the website that provide you Conferencing on their own server. I tried to get into this field and had RED-5 server installed and everything but it’s so complicated. Anyway is anyone can show me a good program that I can try I need it to be able to do Multi casting (2+ people in conference with Camera) Any help!?!?!?
  18. Hi everyone, I'm trying to create a page, but in this page I need to create a user management system that redirect every users to his own page, Just imagine something like University portal so if you login as a student you will be redirected to your own page and can see your information, Time tables, Exams and other stuff. So I don't need any scripts here I just need a start up, since I'm so confused Should I create separate Table for every user? should I create different folder for every user?! is there any program that does this like Joomla?!? Thanks
  19. Hey guys, Qucik question I have a field in my databse called Images and it stores my images (Thubmnails) I have a search page that generates a list of my database, I need to know How can I show this image that is decoded to binary and convert it to I used this code, but ofcourse it just show that binary codes that is stored there!! can you please help me... echo "<td width='130'><div align='left'></div></td>"; echo "<td>"; echo "<br>"; echo "</td>"; echo "</tr>"; echo "<td><div align='left'>Pictures........</div></td>"; echo "<td>"; [color=red]echo $result['Images'];[/color] echo "</td>"; echo $result['Images']; is the area that I want to show my pic
  20. Hey guys, I'm not looking for any code here but I just need your helps, I'm trying to create a Directory listing that has a MYSQL search option so whenever you type someones name it goes through whole database and pulls up those people that match the search code and shows them in a table, Now what I'm trying to do is add their picture to the result so I basically need a Directory application there are 430 people in my list so I really don't want to add their image name one by one and or rename it and then add it to the DB, Any Suggestion or even if you know any CMS or PHP Based application that can help me ?? Thanks
  21. I'm pretty sure there is no error, I've tried that I didnt get anything.. well here is my whole scrpt do you mind take a look at it and tell me if it looks OK or not!? <link href="../css/lightstyle.css" type="text/css" rel="stylesheet" /> <?php include("../header.php"); ?> <script type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <form name="search" method="post" action="<?=$PHP_SELF?>"> <fieldset><legend>Phonebook System</legend><input name="find" type="text" value="Search" maxlength="100" /> <div align="left"><h5> <Select NAME="field" class="arad"> <option value="name">Name and(or) Last name</option> <option value="cell">Cell Number</option> <option value="ext">Extension / Office</option> <option value="dep">Department</option> </Select> <input type="hidden" name="searching" value="yes" /> <input type="submit" name="search" value="Search" class="btt1"/> </div> </form> <div align="left"> <p> <? if ($searching =="yes") { echo "<h5>Results<p>"; if ($find == "") { echo "<p>You forgot to enter a search criteria"; exit; } mysql_connect("localhost", "Uganda", "u^77HYuj***$$") or die(mysql_error()); mysql_select_db("movedb") or die(mysql_error()); $find = strtoupper($find); $find = strip_tags($find); $find = trim ($find); //Now we search for our search term, in the field the user specified $data = mysql_query("SELECT * FROM sheet1sa WHERE upper($field) LIKE'%$find%'"); while($result = mysql_fetch_array( $data )) { echo <<<HTML <table width="400" border="0" class="sample"> <tr> <td width="97" rowspan="5"><? echo $F6; ?> </td> <td width="125">Name, Lastname</td> <td width="164"> <? echo $name; ?> </td> </tr> <tr> <td>Cell Number </td> <td> <?php echo $cell; ?> </td> </tr> <tr> <td>Extension Number </td> <td> <?php echo $ext; ?> </td> </tr> <tr> <td>Office Number </td> <td><?php echo $F2; ?> </td> </tr> <tr> <td>Department</td> <td><?php echo $code; ?> </td> </tr> </table> <br> <br> HTML; } $anymatches=mysql_num_rows($data); if ($anymatches == 0) { echo "<h5>Sorry, but I can not find the person that you are looking for.<br>Please .<br><br>Thanks"; } //And we remind them what they searched for echo "<b><h5>Searched For:</b></b> " .$find; echo "<br>"; echo "<br>"; } ?> <head> </head> <body> </p> <p> </p> <hr width="500" size="1" /> <p> </p> <p> </p> <p align="center"> </p> </body> </html>
  22. About the cookies, You have to save your Authentication cookie in a file and use the include link to that Cookie in the first line of every page you wants to be protected; Example: <?php include("../auth_cookie.php"); ?>
  23. well the first thing is Are you trying to set account elevation or not? Like if XYZ logged in take him to index2.php if TOP logged in take him to Index3.php ....??? If that's the case you have to set groups for your users and set Group home page for that group so everyone can that would login will see his own group home page
  24. Yes im getting My Table every thing works just fine, But I dont see VARs!! Just want to remember again: If I use my echo command outside my HTML section I can see the VARS so it means everything is ok in PHP
  25. Bu as I said if I just call this variabales ouside of my HTML area I can see the result so there is nothing wrong with that variable example if i use $data = mysql_query("SELECT * FROM sheet1sa WHERE upper($field) LIKE'%$find%'"); while($result = mysql_fetch_array( $data )) { echo $cell; I'll see the cell number but if I put in that HTML format nothing shows up
×
×
  • 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.