Jump to content

sdlyr8

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

sdlyr8's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hey, I've always wondered how its done. How does a page like www.domain.com/username know which user's profile to load? I know about GETs and POSTs, but how does one make a script like that? Basically the same deal with on wikipedia's site. Let me know if i'm not making any sense.. thanks!
  2. I'm working on a login script for a site right now, and am having problems saving cookies. After I save the cookies, later in the script I can access them and they do have the correct data. but one any other pages it doesn't have any knowledge of the cookie even existing! i've been working for way too long on this so maybe just a good night's sleep or a fresh set of eyes would help. But does anyone see a problem with my code? Thanks! <?php require_once("../db/connect.php"); $uname = $_POST['username']; $pword = $_POST['password']; $sql = "SELECT * FROM Users WHERE user_name like '$uname' AND password = MD5('$pword');"; $result = mysql_query($sql); $array = mysql_fetch_array($result); $rows = mysql_num_rows($result); if($rows==0) $url="Signin.php?error=1"; else if($array[activated]!=1) $url="Welcome.php"; else { # Username matches password! session_start(); $_SESSION['uname'] = $uname; $_SESSION['id'] = $array[user_id]; $_SESSION['name'] = $array[first_name]; if($_POST['rememberme']=="on") { setcookie("uname", $uname, time()+1209600); # 14 days setcookie("token", $array[token], time()+1209600); } $url="index.php"; } header("Location: ../$url");
  3. I am looking for a way in PHP (or open to other possibilities if any are available), to open up a PDF document and display it's contents to the screen and sometimes do some simple manipulation before displaying it. I have a simple working version now that uses the linux command pdf2html, but it's a very basic conversion. No tables, formatting, images, or colors. And I get a lot of random characters mixed in sometimes. I know there has to be some other way of doing this because Google has a way that it indexes PDF documents and is able to convert them into very pretty webpages. That's basically what I would like to find. Does anyone know of a way to do this?
  4. I am looking for a way in PHP (or open to other possibilities if any are available), to open up a PDF document and display it's contents to the screen and sometimes do some simple manipulation before displaying it. I have a simple working version now that uses the linux command pdf2html, but it's a very basic conversion. No tables, formatting, images, or colors. And I get a lot of random characters mixed in sometimes. I know there has to be some other way of doing this because Google has a way that it indexes PDF documents and is able to convert them into very pretty webpages. That's basically what I would like to find. Does anyone know of a way to do this?
  5. Also, I have narrowed it down to the error comes from the line... java_autoload("poi.jar;lucene-core.jar;poi2.jar;htmlparser.jar;highlight.jar");
  6. I'm working on a lucene search with PHP/Java bridge, and when I get my search results, It sometime works, sometimes gives me the attached error message (or similar, it is always random). Sometimes its quick, and sometimes it takes forever to load. I searched google and couldn't find anything about it. Has anyone seen similar or know what is causing this? Thanks in advance! [attachment deleted by admin]
  7. Hey I'm writing a script that will convert a bunch of html documents and turn them into a wiki page. But some have <script>...</script> and <style>...</style> tags that I just need to get rid of. And I'm new with regular expressions so i don't know if i'm even doing it right. But it isn't working so can someone tell me what i'm doing wrong? Thanks a ton! $t = eregi_replace("<script(a-zA-Z0-9[:punct:][:space:])*</script>", "", $t);
  8. I have been searching everywhere and have been slamming my head against a wall looking for this script. Does anyone know how I would be able to open up a word document in PHP and get the text out of it. I do not need formatting or anything else other than the text. My server is Red Hat (so none of the Microsoft DOM stuff will work). Can anyone PLEASE help me? Thanks in advance!!
×
×
  • 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.