OCR Optical Character Reading

Sep 1, 2005

Asking the impossible but does anyone know of any code that will allow the text to be pulled from images?

I am trying to create a document management system that will allow a user to upload a scanned document, categorize the document and the system will OCR the document and put all the text it finds in the database. Then the text in the image can be searchable.

ADVERTISEMENT

Optical Character Recognition?

Jul 19, 2010

I need to use a OCR class in PHP. What class should I use. Does any one know any good class to do this kind of task?

View 4 Replies View Related

Reading Text File Character By Character?

Feb 22, 2010

i m trying to store a text file into database below format of text file i hv text file like this:

0100102001110271 0409141151I1476201
0100102001110125 0409141351O1476301
0100101300000030 0409141630O1476401

[code]....

how can store it into my database table att0310 my table fileds: cardno date time IO(in-out) and serial no 0100102001110271 this is card no 040914 for date
1151 for time I for IO 1476201 for serial no till date data is inserted correctly into database but next data not stored into database. because of there is no space b/w those digits. hw can i store that into database.... i tried so many times. i used fopen function to read file character by character but i only display dat on browser not into database .

<html>
<?
$con=mysql_connect("localhost","root","root");
if (!$con)

[code]....

View 3 Replies View Related

Recognizing And Reading A New Line Character?

Jun 11, 2009

In my program I have an if else statement where I'm trying to see if that line is a skipped line. My text is like this:

fruits
vegetables.

So it has to be able to know to skip to the next line if theres no text in that line.

if†($invalidcheck[0]=='
'){
$i++;
} †

but it doesn't seem to be reading it. Does anyone know how I can fix this? Also I was wondering if it is reasonable to try to do something like if the character isn't a-z, A-Z, and all symbols.

View 6 Replies View Related

Reading Character From Lines From A File

Oct 20, 2007

I'm using file() to create an array of the lines from a .txt file.† I guess i have two questions.

1) how to I refer to each line individually after the array is created.†

† † ie.† do action A to line 5.

2)† how would I search through that line in order to fine a specific character.†

ex.† †1 Product Name: Macromedia Director MX 2004 Bible †so I want to loop through to ':' so I can cut of that part of the line and then display the rest of the line.

View 4 Replies View Related

Excel - Character Encoding When Reading XLS Files?

Sep 23, 2009

I'm using the PHP-Excel-Reader library to read some XLS files and immediately have hit this issue:

PHP Notice: iconv() [function.iconv]: Detected an incomplete multibyte character in input string in C:webdocshousingexcel_reader2.php on line 1718

The line in question is this:

$result = iconv('UTF-16LE', $this->_defaultEncoding, $string);

And I've added some debugging info before that to help diagnose the problem:

[Code]...

I've tried changing to the _defaultEncoding to any number of random charsets but it obviously hasn't helped.

View 3 Replies View Related

Detected An Illegal Character In Input String When Reading Xls File And Converting It Into Csv?

Jul 13, 2011

I am getting error iconv() [function.iconv]: Detected an illegal character in input string when i am reading xls file and converting it into csv. I am using php-excel-library and i get this error in line:

case 'iconv' :
$result = iconv('UTF-16LE', $this->_defaultEncoding, $string);
break;

View 1 Replies View Related

Get The Length Of A String Containing Character References While Counting The Character References As One Single Character?

Oct 14, 2010

How can I get the length of string that also contains character references? I want to count only the number of characters which will be displayed in the browser. Like

$raw = "Stack&#00f9" = Length = 6
$raw = "Stack12345" = Length = 10
$raw = "Stack&#00f9&#00f9" = Length = 7

View 5 Replies View Related

Expensive For Template Reading: Database Query Or File Reading?

Dec 5, 2010

My question is fairly simple; I need to read out some templates (in PHP) and send them to the client.

For this kind of data, specifically text/html and text/javascript; is it more expensive to read them out a MySQL database or out of files?

inb4 security; I'm aware.

PS: I read other topics about similar questions but they either had to do with other kind of data, or haven't been answered.

View 3 Replies View Related

Html - Replace Certain Character With A Defined Character For It In A String Using Script?

Mar 16, 2011

I have a question that can I replace a certain character like # with &#35; in a string. I have all the character checkers and their replacer in an array. Like this--

$string_check = array(
"#" => "&#35;",
.... and so on (list is too big)
);

View 3 Replies View Related

Regex - Preg_replace Regular Expression / Remove Anything Before A Given Character And Anything After A Given Character?

Mar 4, 2011

How to remove anything before a given character and anything after a given character with preg_replace using a regular expression? Of course this could be done in many other ways like explode and striping the string. But I am curious about preg_replace and regex.

So the only thing I need from the string below is 03b and remove every thing before/and slash (/) and after/and dot (.)

$string = 'rmbefore/03b.rmafter'

View 4 Replies View Related

Regex To Get String After A Character Ending With Another Optional Character And Not Matching It?

May 9, 2011

I'm struggling with a regex, here's an example of the input string

test#string=val

i need to get "string" no matter what's inside it (including special charso but bviously not including the '=') it's always preceded by the '#' character, but i don't need it included. The word ahead of it ('test' in this case), is also optional.

The '=' is optional, but if it's there i need it to be ignored. I've been using something like this

#([wW]*)

But i can't manage to handle the optional '='

View 3 Replies View Related

Use Preg_replace To Replace Character Unless An Escape Character Precedes

Sep 3, 2009

i'm trying to do the following hope there's a reg_ex expert around to shed some light. I need to replace the character [ in my code and make it a {. But there is cases where the [ needs to remain a [ and not change. So the way i figured it is i need to use the

preg_replace("[", "{", $string);

function with a suitable regular expression that will result the [ characters that are not preceded by the escape character to be used lets say . So how can i get to replace this "[" and not this "["?

View 2 Replies View Related

Match The First Character In String, AFTER A Certain Character?

Nov 28, 2010

I want to match the first character AFTER a hyphen. See below.Language: PHP or JavaScript.example:my-first-nameI

View 4 Replies View Related

Check Whether A Character Is A Unicode Character Or Not?

Aug 29, 2009

How can I check whether a character is a Unicode character or not with PHP?

View 7 Replies View Related

File Write Character By Character?

Mar 26, 2009

I want write file character by character...i tried this but this wasnt working

$fw=fopen("test.txt","w");
$str="Hello world printing every character in a new line";
for($i=0;$i<strlen($str);$i++)
{
fprintf($fw,"%c
",$str[i]);
}

View 7 Replies View Related

Reading A Gif

Oct 19, 2000

I want to read a gif and display it on the browser.the code i use is as follows..
-------------------------------------------
$fp = fopen("../images/Powered1.gif","rb");
$size = filesize("../images/Powered1.gif");
for($i=0 ; $i<$size ; ++$i)
echo fgetc($fp);
-------------------------------------------
but the gif is not shown.well i guess in the binary mode when i use feof() it reads the end-of-file character before the end!!

View 5 Replies View Related

Reading XML With PHP

Mar 16, 2007

First of all I want to say I do not have very clear understanding of
XML and PHP and what you can do with those two.
Now the problem I have is:
There is that booking company that sends data to me via XML and I have
in my server to read that XML and store it in a DB.
What I have no Idea how to do is read that XML.
To start with, I though they were using $_POST to upload an XML file,
but it seems they do not as when I get a request in my script I
print_r the $_POST and it is empty. The same with $_GET, empty.

Do you have any idea of other ways that they might send the XML data
and how can I read them with a PHP4 script?

View 4 Replies View Related

Reading

Jul 17, 2005

I must read an HTML-free web page. The only documentation I have is this : :

temp: This request will return an HTML-free web page, consisting of a
simple ASCII string of pipe-delimited data. The data will be in the
format of :

"PROBE1_NAME|TEMP|PROBE2_NAME|TEMPÖ"

How can I do ?

View 5 Replies View Related

Reading PDF Help

Jun 27, 2005

I have download the latest verion of pdflib (pdflib 6.0) from http://www.pdflib.com/ and I configure the php to support pdflib. The following is phpinfo() return

PDF Support enabled
PDFlib GmbH Version 6.0.1p1
PECL Version 2.0.3
Revision $Revision: 1.55.2.15 $

and

Configure Command list below

'./configure' '--build=i586-mandrake-linux-gnu' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--enable-discard-path' '--disable-force-cgi-redirect' '--enable-shared' '--disable-static' '--disable-debug' '--disable-rpath' '--enable-pic' '--enable-inline-optimization' '--enable-memory-limit' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--with-pear=/usr/share/pear' '--enable-magic-quotes' '--enable-debugger' '--enable-track-vars' '--with-exec-dir=/usr/bin' '--with-versioning' '--with-mod_charset' '--with-regex=php' '--enable-track-vars' '--enable-trans-sid' '--enable-safe-mode' '--enable-ctype' '--enable-ftp' '--with-gettext=/usr' '--enable-posix' '--enable-session' '--enable-sysvsem' '--enable-sysvshm' '--enable-yp' '--with-openssl=/usr' '--without-kerberos' '--with-ttf' '--with-freetype-dir=/usr' '--with-zlib=/usr' '--with-zlib=/usr' '--with-zlib-dir=/usr' '--without-pear'

I try the following code copied from php.net for testing.....

View 1 Replies View Related

Not Reading Php.ini

Oct 20, 2005

I am running Redhat ES Release 3, Apache 2.0.46, PHP 5.0.5. I used the --with-config-file-path option to set the path to php.ini. After installation, I run phpinfo() and see my php.ini file in the correct location. However, none of my other settings, like max_execution_time, are showing up correctly. Still getting the default value of 30. There is only one php.ini file on the entire server. Restarted apache, even re-built.

View 2 Replies View Related

Reading IE's

Jun 26, 2007

Probably completely wrong forum to ask this in, but wasn't sure where to start. Is it possible to read/get the favourites/bookmarks that someone has in their internet explorer favourites folder? maybe using php/javascript or something.

View 5 Replies View Related

Reading XML

Aug 22, 2007

I have a XML file and I want to read this and add each node to a variable. ie

<Table>1<Table
<Person>John</Person>

to

$Table
$Person.

View 10 Replies View Related

Reading Xml (using 4.3.11)

Sep 26, 2005

For testing purposes, I would like to read from a xml document and put the data read from the .xml file onto a web page. However, the example the book provided is for 5.x (as I found out with these messages)

Warning: domdocument() expects at least 1 parameter, 0 given in /home/exlluhz/public_html/books/xmlread.php on line 5

Fatal error: Call to undefined function: load() in /home/exlluhz/public_html/books/xmlread.php on line 6

Does anyone know of a way to read a xml file and then display it using php 4.3.11? Code:

View 9 Replies View Related

Reading A Url

Dec 26, 2005

For a long time I have been trying to find a way to read contents of a url while keeping session alive. To explain what I need I bring an example. We know there are two version of this site. one when you haven't logged in and one when you have. If I use fopen and fread I get the version as I haven't logged in. I asked somewhere else and they suggested curl function manual but I think it was too complecated for me.

View 5 Replies View Related

Reading Id From URL?

May 10, 2011

My question is pertaining to extracting information from the URL using PHP.I've three pages in the website I am building

catalogues.html

form_userdata.php

mail.php

The schema is as follows. The user will choose a file to download from catalogues.html for eg

a href="form_userdata.php?id=1026&name=Vibrating Feeder - Heavy duty -VFH" target="_blank"

This id & name will be passed to form_userdata.php and after entering the details in form_userdata.php page, the page passes control to mail.php, that will check if the fields are all true and valid.My question is how can I use the ID & name specified in "a href" in my code.I am passing the ID and name from catalogues->form_userdata and collecting it in mail.php

View 5 Replies View Related

Cannot Use [] For Reading?

Sep 29, 2010

In one of my scripts, I try to do the following

However, PHP does not allow me to do this, giving me this error

Fatal error: Cannot use [] for reading in /file.php on line 55

The self::get function return either a bool, or an object.

Edit: The get function creates a new object which again loads data from a mysql database.

View 2 Replies View Related

Reading A TXT

Nov 21, 2007

I have a huge TXT with a list of streets:

street 1
street 2
street 3

I would like the php to read them and place them in the same order as they appear in the database inside the street column.
I know how to do it when txt looks like

street 1, street 2, street 3

but don't know how to handle with the line breaks. Any hints?

View 11 Replies View Related

The Character '

Aug 13, 2001

well i've made a form and when i type something with an ' in it like "it's" then i get an error like this: You have an error in your SQL syntax near 's a shiny day at line 2
the colum type is text.

View 1 Replies View Related

Character ¬

May 13, 2007

The character ¬ shows up multiple times on my parsed strings. I tried to get
rid of it with the following code without success. Is that character
represented by anything else? Thanks

$bad_chars = array(chr(194), '¬');
str_replace($bad_chars, '', $parsed_string)

View 2 Replies View Related

Add A Character

Sep 11, 2007

I have inherited some data from a client with one particularly irksome field, namely, the "birthdate" field. They have the dates formatted as "mmdd" with no character to separate the mm from the dd. What I would like to do is to simply add a dash ("-") after the 2nd character in the string. Is there a way to do this in PHP 5?

View 2 Replies View Related

Character Instead Of #

Apr 2, 2007

Is it possible to do something like wordwrap, but inserting a new line after a certain character (in my case: >), instead of after a certain number of characters.

View 1 Replies View Related

What Does The @ Character Do In It

Dec 16, 2010

Possible Duplicates:Reference - What does this symbol mean in PHP? What does @ mean in PHP? I have a line in my code which looks like this:

@mysql_select_db($dbname) or die( "Error: Unable to select database");

It works, but I want to know what the @ does and why it is there.

View 3 Replies View Related

Reading Categories

Jun 24, 2003

I have a text file called cat.dat which contains the username and the categories they have selected. Another file users.dat is for username and password.

Now, my authentication part is working fine, but I can't read the cat.dat file to get their selected items.

View 3 Replies View Related

Reading A Timestamp

Nov 20, 2000

I am having problems converting a timestamp....it stored as 14 digits like this:

YYYYMMDDHHMMSS
and i use the following to convert it:
$add = date("F d, Y, h:ia T",time($added));

but i always get the current time rather than the converted time from the timestamp....any ideas?

View 8 Replies View Related

Reading And Writing With Php

Aug 27, 2007

In my script i have 1 seperate fopen() sequence to read the file, so it can put it into a textarea.
Then i have another fopen() sequence that will the values i have in the textarea, but for some odd reason it doesn't work! I hope I did an OK job at explaing this. But heres my code! PHP CODE:

View 7 Replies View Related

Reading In Multiarray

Apr 19, 2007

I wrote some code to read in a file

and I'm curious as to is this is a decent way to do it or if there is a much
more elegant way. Essentially I want to convert a text file that into a ul
in html for my nav menu. This way I can easily add and remove links without
messing with any other code(Except of course where the link points to).

Anyways, the code works as far as getting the links into a multi-array that
I can work with but not sure if its the best way or not.

Code:

View 4 Replies View Related

Reading Array

Jul 27, 2007

I have an array with N values, I want read it from the position X to
the end of array...

View 2 Replies View Related

Reading Folders

Jul 17, 2005

If I had several folders full of images, how can I get PHP to open the
folder, read the image names and save the image names (inc extension) to a
MySQL database?

What I am trying to do is create an image gallery using PHP/MySQL, so that
everytime i take a load of pics, all I would have to do is get PHP to read
the contents of the folder and add the filenames to a MySQL database rather
than having to manually input the names into the database

View 11 Replies View Related

PHP Reading Of JAvascript

Jul 17, 2005

I am new to PHP. But this seems like a terrific language. I have been
using JavaScript up to now but it looks like I will be changing to PHP.
Seems to have more potential.

I am confused about using data in a JavaScript cookie in a PHP file.

The JavaScript Cookie

document.cookie = "order=" + escape("website = " + website + "*" + "sale = "
+ sale + "*" + "name = " + name + "*" + "addr1 = " + addr1 + "*" + "addr2 =
" + addr2 + "*" + "city = " + city + "*" + "countycode = " + countycode +
"*" +"state = " + state + "*" + "zip = " + zip + "*" + "mr = " + mr + "*" +
"fname = " + fname + "*" + "lname = " + lname + "*" + "dept = " + dept + "*"
+ "phone = " + phone + "*" + "ext = " + ext + "*" + "email = " + email + "*"
+ "#");
variable: website =

value: website

delimiter: *

End of cookie: #

Is there a command to convert a JavaScript cookie to a PHP cookie?
I have tried to read the cookie in PHP with no success.

$_COOKIE['order'];

$_COOKIE['order='];

How do I pick out the variables and values in PHP from the JavaScript
cookie?

View 3 Replies View Related

Reading COM1 With Php-win

Dec 24, 2006

I need to read incoming bytes on a COM port but I do not want to have
the script hang if there is nothing to read.

Is there any way to have PHP interrogate a COM port buffer to see if
there is any content before reading it?

Any other method to achieve the result would also be welcome.

View 16 Replies View Related

Reading An MYSQL Row

May 28, 2001

I have a small problem. I want to read 3 colums that have information in MySQL. Here is an example: I have one column for users (userid), passwords (passid), for e-mail (emailid), and url(siteid). How can I read passid, emailid, and siteid and put them into a text box for a form. like:

<!-- beginning -->
$connect = @MYSQL_PCONNECT($host,$user,$pass);
$query = MYSQL_DB_QUERY($db,"SELECT userid,passid,emailid,siteid FROM users WHERE userid = $user_logged")
<!-- end -->

what do i do to enter passid, emailid, and siteid that belong to $user_logged into their own text box , like in a form?

View 8 Replies View Related

Reading A Cookie

Feb 6, 2007

I did try to find the answer to this before posting, so this isn't a
knee jerk reaction.

What I am trying to accomplish is to have a script that opens a
cookie, reads a value, and then use a switch/case to take action based
on that value in the cookie. I want to set the cookie manually, so I
don't need setcookie(). I see that in PHP it stores the cookie in
memory. Is there a way to have PHP just read a cookie from the desktop
machine? Does it have to set it first? Am I better off with Javascript
for this?

The situation is that we have 4 computers. We also have 4 different
types of specialty printers, each for a different function. We don't
know which computer will be hooked up to which printer, and they may
be switched out routinely. We are trying to develop a simple script
that reads the value of the cookie which tells it which printer to
print to and what to print. This way, we can easily switch computers
around as needed, and will only need to change the value in the cookie
to have it access the correct code so that it prints the correct
information in the correct format.

View 29 Replies View Related

Reading As Browser

Jul 23, 2001

I have a file, for example... lets say it looks like this:
-----------
<HTML>
<BODY>
MyStuff
<?PHP
do some php stuff
?>
</BODY>
</HTML
----------

I need to read it into an array/variable, however, I need to have the php code already executed, as if I was reading through a browser, instead of strait off of the disk. I can't have it simply printing... like require or include would do... I need it as a variable... I considered eval, but that doesn't return anything.

View 8 Replies View Related

Reading Tar.z File

Aug 2, 2006

i wanna extract and read data from a tar file i have tried www.phpclasses.org/browse/package/529.html thing. but that is not working for .z file. any idea how to do that ?

View 6 Replies View Related

ADVERTISEMENT