Jump to content

louis_coetzee

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

Everything posted by louis_coetzee

  1. hi everyone, did not know what to make the subject, but here is what I want to do: I have a string, which gets returned to me from a linux app on my server, it looks something like this: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8"> <TITLE> </TITLE> <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Linux)"> <META NAME="AUTHOR" CONTENT="Administrator"> <META NAME="CREATED" CONTENT="20110106;14170000"> <META NAME="CHANGEDBY" CONTENT="HOD"> <META NAME="CHANGED" CONTENT="20110522;16540000"> <STYLE TYPE="text/css"> <!-- @page { margin: 0.26in } P { margin-bottom: 0.15in; direction: ltr; color: #000000; line-height: 0.15in; text-align: justify; widows: 2; orphans: 2 } P.western { font-family: "Arial", sans-serif; font-size: 10pt; so-language: en-US } P.cjk { font-family: "Batang", "바탕", serif; font-size: 10pt } P.ctl { font-family: "Times New Roman", serif; font-size: 10pt; so-language: ar-SA } A:link { color: #0000ff } --> </STYLE> </HEAD> <BODY LANG="en-US" TEXT="#000000" LINK="#0000ff" DIR="LTR" STYLE="border: 5.05pt double #000000; padding: 0.67in 0.92in"> <P>I want this and the tags around it, just not the html, head, body and their closing tags.</P> </BODY> </HTML> within the body, the tags are each styled for example: <p style="color: red"></p> so I cannot just get rid of all html, I want to get only all the content within the body tags, but without the body tags obviously strip_tags does not work as i need, I only want to strip certain tags. If someone can help me with this i will much appreciate it.
  2. Okay, thanks again. Will not worry about it anymore if that is the case.
  3. cool, did that, now if I echo date("n"); I get: Mon, 12 Mar 2012 15:01:29 +0200 - which is correct. But with the date to atom, it still shows: 2012-03-12T15:03:34Z with the Z at the end. Why is it not showing it with the +02:00 at the end? Thanks for your help so far.
  4. I hope I understand you correctly. but the timezone for my pc is set to: (UTC+02:00) Harare, Pretoria and the php.ini set to UTC
  5. This is the output for echo date("r"); Mon, 12 Mar 2012 11:51:08 +0000
  6. What should I change my timezone settings in php.ini to to get the following: 2012-03-12T12:00:02+02:00 which is (UTC+02:00) Harare, Pretoria
  7. @requinix Thanks very much for your reply.
  8. Hi Everyone, Please have a look at this, and tell me if its right? I am generating a sitemap for my website dynamically. The date I am providing: 2012-02-24 11:56:09 and this is the output I am getting: 2012-02-24T11:56:09Z now I am not sure of the Z at the end of the returned value. I think I am looking for something similar to this: 2012-03-12T12:00:02+02:00 not to sure what I am doing wrong and where it gets the timezone from, I am guessing from the php config file. any help would be much appreciated. thanks My code: <lastmod><?php echo $time->toAtom($post['Post']['modified']); ?></lastmod>
  9. The reason for the text extraction is to make the cv's searchable, to search for keywords within.
  10. Hi everyone, I do not know if this is the right place to ask the following, but I know all the php guru's read here. So please take a moment to read and please help point me in the right direction. I have a php website that I am developing, it is a job website, where my problem is that I need to be able to extract text from the following file formats: doc, docx, rtf, txt and maybe pdf. I have googled and done research on this subject, but I do not find any php scripts that can do the job properly. I have found a java app developed by apache that does the text extraction perfectly, called apache tika. (calling it using exec is really a problem, since most hosts don't provide root access.) I need a way to use this with php. If you know of any other method that I can do this, please help and suggest as this is a major bridge that I have to cross very urgently. your help will be much appreciated, thanks
  11. what I have done now is to move the tika jar file to the root dir of my website, it now returns something, but its an error: array(3) { [0]=> string(72) "OpenJDK Client VM warning: Attempt to allocate stack guard pages failed." [1]=> string(42) "Error occurred during initialization of VM" [2]=> string(45) "Could not reserve enough space for code cache" } please note, this does work correctly in my command line
  12. Hi, I have a java file that needs to be executed from my php script, the command I have in it works perfectly when I execute directly in the command line, but when I execute it from php it returns this: array(0) { } I have tested that the exec works by using antiword, which does return results as expected, but its not working for the code below. But I would much rather use apache tika. Also your thoughts on whether this is good practice please. I am using this to extract text from CV's and store that in the db to be able to search through. I need to extract from: pdf, doc, rtf and docx. this is the only tool I have found that can handle them all. your help on the exec problem and any suggestions will be much appreciated. <?php exec('java -jar /etc/tika-app-1.0.jar -t /var/www/html/cvdatabase/400001.doc', $output); var_dump($output); ?>
  13. Hi Everyone, I have the following question: I have a users table in my db, but I have 3 different types of users, now I know that I should use ACL and thats what I will do, but for each of the 3 users I will be collecting different information. As an example: Tables: Empoyees (in place of users) + fin_employees_profiles (finance) + mech_empoyees_profiles (mechanical) and pilots_employees_profiles How would I go about linking this up. Also lets say registration for each is for a different view: http://localhost/employees/register/finance how will I write to 2 different table when in the users controller, because now I want to insert (create) data in both users and the fin_employees_profiles tables. Please help. And if you don't understand something, please ask, I will try to clarify.
  14. Okay, cool. got the solution -> Downloaded helper for CI. thanks any way.
  15. Yes it is, using codeigniter framework, seems like they automatically let it count from 0, no matter what.
  16. I am dynamically populating dropdown boxes with php, it starts from 0. Mysql starts incrementing the id from 1. So that when I for example create a user and he selects say option 0 (South Africa) from the dropdown that it is referring to option 0 in my mysql table instead of 1. How can I fix this, so that mysql starts counting from 0 also? Please help.
  17. Yeah, thats what I want to do, not to sure about keyword generation, just the dump of everything that is text into a table, and then I will search through this for the keywords that was inserted by the searcher. Spelling not that big of an issue, since i would hope that a person creating a cv to search for a job, would not mess that up.
  18. No, I just want to extract the text content of the CV and write it to the database, the person enters their name etc manually, I just want the recruiter, that is searching for the cv to for example enter the word "php" and if a match is found in the extracted text, it will bring up that person's cv and show it (this is the HTML I was referring to).
  19. Hi guys, hope it's fine that I am posting my question here, I know this is where the experts read. I am busy developing a website, job portal in codeigniter. The problem I am having is to upload pdf's to the site and then converting it to text to store in a table, so that recruiters can search for these cv's. Also I would like to display these cv's online (that would be nicely formatted html), if a recruiter views the particular jobseekers profile, after which he can download the cv in the original format. The same would be for word documents. But for now I am looking to find a solution for pdf and the different encodings of pdf. I have googled, and have not found a viable solution, so please push me in the right direction. Thanks in advance.
  20. Hi, I am using cakephp.....sorry for leaving that part out.
  21. Hi, I am trying to make a ajax comment section in a blog inside the posts view.ctp, but I am getting the wrong url in the action part. <?php echo $ajax->form('/comments/add','post',array('update'=>'comments')); ?> <?php echo $form->input('Comment.name');?> <?php echo $form->input('Comment.content');?> <?php echo $form->input('Comment.post_id',array('type'=>'hidden','value'=>$post['Post']['id'])); ?> <?php echo $form->end('Add Comment');?> I get: <form id="form1387038844" onsubmit="event.returnValue = false; return false;" method="post" action="/blog/posts/comments/add"> and the action part must be: <form .......... action="/blog/comments/add"> instead of <form .......... action="/blog/posts/comments/add"> Please help!!!
  22. This code is not inserting anything into my db, don't know why, the $_SESSION variable does contain data. Please have a look. function add_user_to_db() { //print_r($_SESSION['user_reg']); $username = $_SESSION['user_reg']['username']; $password = $_SESSION['user_reg']['password']; $email = $_SESSION['user_reg']['email']; $first_name = $_SESSION['user_reg']['first_name']; $last_name = $_SESSION['user_reg']['last_name']; $pharmacyname = $_SESSION['user_reg']['pharmacyname']; $contact_number = $_SESSION['user_reg']['contact_number']; $connection = db_connect(); $query = "INSERT INTO `pharma_edu`.`users` (`user_id`, `username`, `password`, `email`, `first_name`, `last_name`, `pharmacy_name`, `contact_number`, `user_access`, `active`) VALUES (NULL, '$username','$password', '$email', '$first_name', '$last_name', '$pharmacyname', '$contact_number', '1', 'n')"; if (mysql_query($query)) { return true; }else{ return false; } } add_user_to_db();
  23. I am a web developer, I want this option in my website, if a person wants to request a registration, check it's avalability and let me know, so I can register it.
  24. Hi, I live in South Africa, it is easy to find a domain checker, but where can I find one to check co.za , org.za etc. domains? Any help appreciated. Thanks.
  25. Thanks for your reply, will look into it.
×
×
  • 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.