Jump to content

mga_ka_php

Members
  • Posts

    134
  • Joined

Everything posted by mga_ka_php

  1. try http://www.nomeiger.com/webhosting
  2. does anyone know a software/web application reads a content of a website?
  3. how do i get the content of other websites? i checked the webscraping but how do i get the content if it has password.
  4. i see. ok thanks. that's what i've been thinking, use javascript and redirect it, i'm just looking for a more possible solution. thanks for the advice.
  5. in <form method="get">, when you submit it the url will look something like this http://www.mydomain.com/search.php?keywords=phpfreaks&author=phpfreaks but how do i make the url like this http://www.mydomain.com/search/keywords/phpfreaks/author/phpfreaks when i submit the form?
  6. i have this url http://www.mydomain.com/dvds/search/page/2/?Keywords=holiday&Radius=0&Zip=&StartDate=2009-11-17&EndDate=2010-07-15 this is my rewrite rule RewriteRule ^dvds/search/page/([0-9+])/$ /index2.php i could fetch the values of keywords, radius, zip, startdate and enddate but i can't get the page number if i do this RewriteRule ^dvds/search/page/([0-9+])/$ /index2.php?page=$1 i could get the page number but i can't get the values of keywords, radius, zip, startdate and enddate and if i do this RewriteRule ^dvds/search/page/([0-9+])/(.+)$ /index2.php?page=$1&Keywords=$2 i get ERROR 404 File not Found any suggestions?
  7. from $q = "SELECT CONCAT('horse_name, 'user_name') AS info FROM horses WHERE horse_name = $hn"; to $q = "SELECT CONCAT('horse_name, 'user_name') AS info FROM horses WHERE horse_name = '$hn'"; see the ' at $hn
  8. are you sure the meta didn't work, i use it a lot without a problem. if the meta didn't work. move <?php // Connects to your Database mysql_connect("localhost", "0607197", "12345") or die(mysql_error()); mysql_select_db("db0607197") or die(mysql_error()); //Checks if there is a login cookie if(isset($_COOKIE['ID_my_site'])) //if there is, it logs you in and directes you to the members page { $username = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM Users WHERE username = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )){ if ($pass != $info['password']){ }else{ header("Location: book1.php"); } } } //if the login form is submitted if (isset($_POST['submit'])) { // if form has been submitted // makes sure they filled it in if(!$_POST['username'] | !$_POST['pass'] | !$_POST['pass'] ) { die('<h2><b>You did not fill in a required field.</b><a href="login.php"><font color="#b9c059">Back</a></font></h2>'); } // checks it against the database if (!get_magic_quotes_gpc()) { $_POST['email'] = addslashes($_POST['email']); } $check = mysql_query("SELECT * FROM Users WHERE username = '".$_POST['username']."'")or die(mysql_error()); //Gives error if user dosen't exist $check2 = mysql_num_rows($check); if ($check2 == 0) { die('<h2>No Such Account. <a href=register.php><font color="#b9c059">Click Here to Register</a></font></h2>'); } while($info = mysql_fetch_array( $check )) { $_POST['pass'] = stripslashes($_POST['pass']); $info['password'] = stripslashes($info['password']); $_POST['pass'] = md5($_POST['pass']); //gives error if the password is wrong if ($_POST['pass'] != $info['password']) { die('<h2> Incorrect password, please <a href=login.php><font color="#b9c059">Try again.</a></font>'); } else { // if login is ok then we add a cookie $_POST['username'] = stripslashes($_POST['username']); $hour = time() + 3600; setcookie(ID_my_site, $_POST['username'], $hour); setcookie(Key_my_site, $_POST['pass'], $hour); //then redirect them to the members area header("Location: book1.php"); } } } // if they are not logged in ?> before <html> if your going to use header(), always put that before <html>
  9. $month = 10; $year = 2009; $getthreads = "SELECT * FROM events WHERE active='y' AND date LIKE '%/$month/$year'";
  10. put your code with header("Location: book1.php"); at the top. you already had declared header. or replace header("Location: book1.php"); with echo '<META http-equiv="refresh" content="1;URL=page.php">';
  11. but i am having a problem about that. when i try to add "/" at the end. you can only see the text. the format and images is not loaded. any solution for that?
  12. there's a problem when adding a trailing slash at the end. the images and css doesn't load. it might think that it is a folder
  13. the problem if there is a trailing slash, the images and css doesn't load.
  14. got the same problem which i'm looking for a solution.
  15. in url rewriting, how do make the "/" does not mean a folder? example. http://mydomain.com/php/code/ when i type that it means it will take me to folder php/code/ but how do i make it's not a folder like wordpress does because evertime i put "/" the browser detect it as a folder
  16. does wordpress use mod_rewrite in their permalink? i don't see any .htaccess...
  17. ok i got it now. thanks.this what i'm looking for. thank you.
  18. what if the location of the date is dynamic? because the date is not always on the 20th character for example.
  19. I have a table which contain an ID and Description ID | Description ------------------------------------------------------------------ 1 | Number:1033837|#|Date:2009-03-29|#|Canceled:YES.... Note: the date is within the Description Now, what i am trying to achieve is to get all the records less than the current timestamp But I don't know how to pullout the date within the description. example: SELECT * FROM table1 WHERE $current_timestamp > UNIX_TIMESTAMP( Date in the description column )
  20. what im trying to accomplish is that i have a website which some parts are restricted but users can view that restricted page 5 times.if more than 5, they need to register to access the restricted page. But how do i track the returning visitors? Currently, i used the ip address, but its not a solution because ip changes. how do i accomplish this type of setup?
×
×
  • 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.