Jump to content

louis_coetzee

Members
  • Posts

    117
  • Joined

  • Last visited

    Never

About louis_coetzee

  • Birthday 11/09/1988

Profile Information

  • Gender
    Male
  • Location
    South Africa - Pretoria

louis_coetzee's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  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.
×
×
  • 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.