Jump to content

ursvmg

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ursvmg's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I have been running a stream of PHP scripts using cron. Most of the sites are working perfectly except one. That is getting failed only when invoked using cron. It works fine, when invoked normally in a webpage. It gives me the below error message. /bin/sh: line 1: 3430 Segmentation fault I have a similar code (99% same execution steps - 1% change in names) that is executed properly in cron. I'm really confused on why the segmentation error happens only for a particular site, even though its clone is working properly in cron. Any help would be much appreciated Thanks, Ursvmg
  2. Hi everyone, I'm trying to build a web application in PHP that takes scanned images from user and convert it in to text document. I would like to use Google's Documents List Data API inside my PHP scripts. The online application is available at http://googlecodesamples.com/docs/php/ocr.php. I do not know where to start with and how to invoke the API. Could anyone please direct me.. ? If anyone has any samples, kindly provide.
  3. Any updates? I'm desperately looking for a solution. Kindly help
  4. Dear all, I'm trying to build an application to retrieve PDF documents from a site. The document being there is byte-served, so that I'm not able to get the complete document. When i do a curl get for the document I get only the below. In firebug, I could see three GET requests. First one has the status '302 Found'. Second and third has status as '206 Partial Content'. How to get the complete file in this case. Or guide me, if I'm doing it in a wrong way. Regards, Ursvmg
  5. Hi, Is this possible with a shared server?
  6. Hi all, I'm trying to build an online application, where users can upload scanned images and get that one converted to txt files. I have my hosting at bluehost.com and I need to know how can i install a software in server. Right now I'm thinking of using tesseract (OCR product) software. But I do not know how to proceed at this point. Kindly advice. Thanks, Ursvmg
  7. . . <td> <form name="statuses" method=post><select name=status style="BACKGROUND-COLOR:#B3C7D7; font-family: verdana;font-weight:normal; font-size: 11px; color:black;" onChange="location=document.statuses.status.options[document.statuses.status.selectedIndex].value"> <option value="">[- Select Status -] <option value="">----------------- <option value="a.asp?status=On&state=&city=&category=R">On Schedule <option value="a.asp?status=PP&state=&city=&category=R">Postponed <option value="a.asp?status=C&state=&city=&category=R">Cancelled </select></td></form> <td> <form name="categories" method=post><select name=category style="BACKGROUND-COLOR:#B3C7D7; font-family: verdana;font-weight:normal; font-size: 11px; color:black;" onChange="location=document.categories.category.options[document.categories.category.selectedIndex].value"> <option value="R"> Real Estate <option value="">----------------- <option value="a.asp?category=R&state=&city=&status=">Real Estate <option value="a.asp?category=P&state=&city=&status=">Personal Property <option value="a.asp?category=O&state=&city=&status=">Other </select></td></form> </table> . . I would like to remove data between <form> tags.
  8. Hi, I have a very big html page, from which i need to remove data between specific tags. The edited html will then be used for parsing. Since the piece to be removed has unwanted(huge) data, which I don't want to be parsed. I did some google search, but I found none to be more effective. Most of them uses preg_replace. Is there any other way to do it? Could you please advice me on this. Regards, Ursvmg
  9. Hi all, I have a PHP to scrap huge data(around 10000 entries) from a html page using simplehtmldom. My objective is to load the data in to MySQL table. I know, it is not a good idea to scrap and load at a stretch. Now I have been inserting 100 rows at a time, ending up with 100 insert queries for every html page. I would like to know how best I can handle this situation considering performance. What are the PHP/MySQL parameters that I need to set? Kindly throw some light on memory management in PHP. Regards, ursvmg
  10. Hi all, I have a requirement to read a text file with around 50k lines of data. I need to prepare an output array like below. 1) First i need to start with the record 1. Get every 50th record and store it in the array. Once end of file reached and if limit not crossed 5000 the proceed to next step 2) Now i need to start with second record. Get every 50th record and store it in the array. This would iterate until the output array limit reaches 5000. I do not want to start from top every time, as I feel, traversing the entire file every time would compromise the performance. Is it true? Or Is there any other better way to achieve it? Do we have any user-defined PHP classes to achieve this? Regards, Ursvmg
  11. When i viewed the html source code, it had something like below. "I need a Regular expression to find a complete postal address for example <br> Jack John <br> 1100 Glendon, <br> Los Angeles, <br> CA, 90024 <br> United States <br> Thanx in advance i need it very urgently " So I did a work around by removing all the html tags using strip_tags() function. Now i have continuous piece of data to pattern match and its working fine. Please let me know if there is any other easy way to do it. Regards, ursvmg
  12. Hi all, I'm trying to pattern match street address from a paragraph. My RexEx code is able to match the address if it is found in a single line. But I'm not able to make it work for an address that spreads over multiple lines. Following is the code: $address = "I need a Regular expression to find a complete postal address for example Jack John 1100 Glendon, Los Angeles, CA, 90024 United States . Thanx in advance i need it very urgently "; $pattern1 = "/((\d+)[\-, ]*(\w+[\- ]*\w+[\- ]*\w+))[\-, ]*(\w+[\- ]?\w+)[\-, ]*([A-Z]{2})[\-, ]*(\d{5})/"; if ( preg_match( $pattern1, $address, $matches ) == 1 ) { echo "Match found"; } The above gives out "Match found" as output. But I need to modify this RegEX to work for the paragraph below. "I need a Regular expression to find a complete postal address for example Jack John 1100 Glendon, Los Angeles, CA, 90024 United States Thanx in advance i need it very urgently " I tried the following RegEx. But it is not working $pattern1 = "/((\d+)[\-, ]*(\w+[\- ]*\w+[\- ]*\w+))\s(\w+[\- ]?\w+)[\-, ]*([A-Z]{2})[\-, ]*(\d{5})/s"; Kindly help me on this. P.S. I'm not very much familiar with advanced topics of RegEx. I arrive at this RegEx only with the help of google. Regards, ursvmg
×
×
  • 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.