Jump to content

mike2

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by mike2

  1. OK I will take all of that into consideration. In your opinion is still possible to do this using the Swish-e search engine? Here is the Swish-e link Swish-e.org
  2. Yes I have. I have read both these documents and so far they haven't been much help to me. http://devzone.zend.com/1591/indexing-web-content-with-php-and-swish-e/ http://swish-e.org/docs/swish-search.html#phrase_searching
  3. To whom it may concern: I have PHP code that I am trying to improve upon. I want to fix it so that when I put a dash next to a word, the word that is next to a dash is excluded. I also want to see if it is possible, what would I have to change in my code so that when I search for words or phrases within PDF documents, that I get exactly what I want. Whenever I have the Exact Phrase radio button enabled, and I type in the phrase Oil Gas Company, three PDF appear, however when I open the links of those PDF documents to search for that phrase, that exact phrase is not there so since it is not there I want to know what I would have to do to fix it so that the 0 matches found appears on my screen? also When it comes to using the dash what I want know is, is it possible to have something like Tax credit -appraisal in the search box and when either the Exact Phrase or the Any Phrase radio is selected it will do the function of both radio buttons but at the same time exclude the word appraisal in its search? Any Phrase meaning of course it will search for either words in the phrase and bring up PDFs that have either results or both. I ask these questions because whenever I type into the my search box bank and loans -money while the Exact Phrase radio button is highlighted it is only suppose to return PDF documents that have that exact phrase but without the word money in them. Is this possible with my code. Is this possible with my code? attached with this message is my php code. Any help would be greatly appreciated. Finalsearchcode2.txt
  4. I will learn from this. Thank you for the advice.
  5. Here is my answer to your question: This is where I am getting the result from my Swish query: <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.') ; ?>"> <?php echo $r->swishdocpath; ?> </a> </strong> (score: <?php echo $r->swishrank; ?>) <br/> <?php echo $r->swishdocpath; ?><br /> To the best of my knowledge this code displays my PDF files as links and they open up when you click them. Is that what you are asking me?
  6. I am testing my current code. I got the results as shown above where the paginated links just keep showing up in separate results.
  7. Hello everyone. I have some code that I need some assistance with. By the way I am using CentOS 6.5 on my Linux server. Here is my current code: <html> <head></head> <body> <?php if (!isset($_POST['q'])) { ?> <img src="/wvb-logo-slogen.png" border="0" /> //code for logo <h2>Search</h2> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> <input type="text" name="q" size="30" /> </form> <?php } else { ?> <img src="/wvb-logo-slogen.png" border="0" /> //code for logo <h2>Search Results</h2> <?php try { // create object // $swish = new Swish('/usr/local/apache/htdocs/swish/index.swish-e'); $swish = new Swish('/var/www/html/pdf2/index.swish-e'); // get and run query from command-line $queryStr = htmlentities($_POST['q']); $result = $swish->query($queryStr); ?> Found <?php echo $result->hits; ?> match(es) for '<?php echo $queryStr; ?>'. <?php // iterate over result set // print details for each match while($r = $result->nextResult()) { ?> <p> <?php echo $r->swishreccount; ?> <strong> <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.') ; ?>"> <?php echo $r->swishdocpath; ?> </a> </strong> (score: <?php echo $r->swishrank; ?>) <br/> <?php echo $r->swishdocpath; ?><br /> <?php $file = '/var/www/html/active_colist.csv'; $fh = fopen($file, 'r'); $companies = array(); $row = fgetcsv($fh, 1024); // ignore header while ($row = fgetcsv($fh, 1024)) { $companies[$row[0]] = array('company' => $row[1], 'country' => $row[3]); //changed line } fclose($fh); //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $wvb_number = substr($filenames[1],1,12); $country = substr($filenames[1],1,3); echo 'Country: '.$companies[$wvb_number]['country']."<br />"; //echo 'Country Name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year."<br />"; //$filenames = explode(".", $r->swishdocpath); //$wvb_number = substr($filenames[1],1,12); echo 'WVB Number: '.$wvb_number."<br />"; echo 'Company Name: '.$companies[$wvb_number]['company']; ?> </p> //Suggested Pagination code. <?php ///////////////FILLING ARRAY WITH DUMMY DATA//////////////////// $key = array(); for($i=0; $i<200; $i++) { //fill array data $key[] = "num = ".$i; } //////////////////////////////////////////////////////////////// /////////////////////START OF ARRAY PAGINATION CODE///////////////////// $ptemp="http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; $pt=explode('&',$ptemp); if (strpos($ptemp,'pageno')) array_pop($pt); $pt=implode('&',$pt); $ptemp=$pt; $array=$key; // REPLACE $KEY WITH YOUR ARRAY VARIABLE $page = $_REQUEST['pageno']; $currentpage = isset($page) ? (integer)$page : 1; $numperpage = 10; //NUMBER OF RECORDS TO BE DISPLAYED PER PAGE $total = count($array); $numofpages = ceil($total / $numperpage); //TOTAL NUMBER OF PAGES if(isset($array)) { if (($currentpage > 0) && ($currentpages <= $numofpages)) { //STARTING LOOP FOR ARRAY DATA $start = ($currentpage-1) * $numperpage; for($i=$start;$i<=($numperpage+$start-1);$i++) { ///////////PLACE YOUR CODE HERE////////////////////////// echo $array[$i] .' '; //////////////////////////////////////////////////////// } } } if ($currentpage != 1) { //GOING BACK FROM PAGE 1 SHOULD NOT BET ALLOWED $previous_page = $currentpage - 1; $previous = '<a href="'.$ptemp.'?pageno='.$previous_page.'"> <</a> '; } $pages = ''; for ($a=1; $a<=$numofpages; $a++) { if ($a == $currentpage) $pages .= $a .'</u> '; else $pages .= '<a href="'.$ptemp.'?pageno='.$a.'" >'. $a .'</a> '; } $pages = substr($pages,0,-1); //REMOVING THE LAST COMMA (,) if ($currentpage != $numofpages) { //GOING AHEAD OF LAST PAGE SHOULD NOT BE ALLOWED $next_page = $currentpage + 1; $next = ' <a href="'.$ptemp.'?pageno='.$next_page.'"> ></a>'; } echo ' '. $previous . $pages . $next; //PAGINATION LINKS /////////////////////END OF ARRAY PAGINATION CODE///////////////////// ?> <?php } } catch (Exception $e) { die('ERROR: ' . $e->getMessage()); } } ?> </body> </html> As you can see from the code above when I implemented that code into my script I was able to get it to display but only after the </p> marker. When I did that I got the following results. Results: Found 736 match(es) for 'test'. 1 ./ITA000030192.2013.A.00.L.12.31.PDF (score: 1000) ./ITA000030192.2013.A.00.L.12.31.PDF Country: Italian Republic (Italy) Year: 2013 WVB Number: ITA000030192 Company Name: BEGHELLI num = 0 num = 1 num = 2 num = 3 num = 4 num = 5 num = 6 num = 7 num = 8 num = 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 > 2 ./ITA000030164.2013.A.00.L.12.31.PDF (score: 976) ./ITA000030164.2013.A.00.L.12.31.PDF Country: Italian Republic (Italy) Year: 2013 WVB Number: ITA000030164 Company Name: CREDITO EMILIANO num = 0 num = 1 num = 2 num = 3 num = 4 num = 5 num = 6 num = 7 num = 8 num = 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 > 127 ./IND000102048.2012.A.00.E.03.31.PDF (score: 457) ./IND000102048.2012.A.00.E.03.31.PDF Country: Year: 2012 WVB Number: IND000102048 Company Name: num = 0 num = 1 num = 2 num = 3 num = 4 num = 5 num = 6 num = 7 num = 8 num = 9 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 > 128 ./NLD000030064.2013.A.00.E.12.28.PDF (score: 457) ./NLD000030064.2013.A.00.E.12.28.PDF The results page shows that there are 736 matches. There are currently 5000 PDF files in the /var/www/html/pdf2 directory. What I am trying to accomplish in terms of pagination is twofold. First get the above page links to display on the top and bottom of the page and only display 10 results at a time on each page. Second have the links working correctly so that they can go to the correct results. Can this be accomplished with the above pagination code where it states //Suggested pagination code? Do I need to change my layout? Furthermore I was also told that I should focus on the following lines of code: <?php ///////////////FILLING ARRAY WITH DUMMY DATA//////////////////// $key = array(); for($i=0; $i<200; $i++) { //fill array data $key[] = "num = ".$i; } as well as the result variable $queryStr = htmlentities($_POST['q']); $result = $swish->query($queryStr); What would I need to change in these two areas in order to get what it is that I am trying to accomplish. Sorry for the large post. Any assistance would be greatly appreciated.
  8. To answer your question honestly I am worried that my output is not going to come out correctly. I am concerned it is going to come out with lines skipped. Also are you sure that I need to rearrange this code? Can't I just incorporate this code somewhere?
  9. Here in lies my problem with changing the layout of the code: I have never used php coding before to do a project like this. This project was assigned to me for work and I have mostly been getting help from people who do know php. I e-mailed this one particular individual to see if he would be willing to do it for me and if so would he charge me because to be quite honest with you I am not sure I am going to have this completed by the June 20th date. Would it be wrong of me to send you the complete details of what I am trying to accomplish as well as ask if either you or someone you know whom you could recommend would be willing to do it for me? I am in way over my head here. I have never done anything like this before and I am getting desperate to get this project completed because I don't want to get in trouble for not having this completed on time.
  10. The user would not be allowed to change the PDF files. However PDF files would be constantly uploaded to the site. I have 5000 PDF files indexed at the moment.
  11. How would I do that though? Would that code be at the very beginning before my search results or after?
  12. Okay. I will try doing that but my question is would this negatively affect my Swish-e search results?
  13. Hi Everyone, I have a question about pagination. I have this code that I would like to incorporate into my php file. This is said code that will be incorporated: try { // Find out how many items are in the table $totalItems = $databaseHandle->query(' select count(*) from tableName ')->fetchColumn(); // Set how many items per page to display $limit = 10; // find how many pages are needed $totalPages = ceil($totalItems / $limit); // Find out which page we are on $currentPage = min($totalPages, filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT, array( 'options' => array( 'default' => 1, 'min_range' => 1, ), ))); // Calculate the offset for the query $offset = ($page - 1) * $limit; // Some information to display to the user $start = $offset + 1; $end = min(($offset + $limit), $total); // "back" link $prevlink = ($page > 1) ? '<a href="?page=1" title="First page">«</a> <a href="?page=' . ($currentPage - 1) . '" title="Previous page">‹</a>' : '<span class="disabled">«</span> <span class="disabled">‹</span>'; // "forward" link $nextlink = ($page < $pages) ? '<a href="?page=' . ($page + 1) . '" title="Next page">›</a> <a href="?page=' . $totalPages . '" title="Last page">»</a>' : '<span class="disabled">›</span> <span class="disabled">»</span>'; // Display the paging information echo '<div id="paging"><p>', $prevlink, ' Page ', $currentPage, ' of ', $totalPages, ' pages, displaying ', $start, '-', $end, ' of ', $totalItems, ' results ', $nextlink, ' </p></div>'; // Get the results. Paged query $stmt = $databaseHandle->prepare(' select * from tableName order by name limit :limit offset :offset '); // Bind the query params $stmt->bindParam(':limit', $limit, PDO:: PARAM_INT); $stmt->bindParam(':offset', $offset, PDO:: PARAM_INT); $stmt->execute(); // Results? if ($stmt->rowCount() > 0) { $stmt->setFetchMode(PDO::FETCH_ASSOC); $iterator = new IteratorIterator($stmt); // Display the results foreach ($iterator as $row) { echo '<p>', $row['name'], '</p>'; } } else { echo '<p>No results could be displayed.</p>'; } } catch (Exception $e) { echo '<p>', $e->getMessage(), '</p>'; } and this is what is in my php file: <html> <head></head> <body> <?php if (!isset($_POST['q'])) { ?> <img src="/wvb-logo-slogen.png" border="0" /> <h2>Search</h2> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> <input type="text" name="q" size="30" /> </form> <?php } else { ?> <img src="/wvb-logo-slogen.png" border="0" /> <h2>Search Results</h2> <?php try { // create object // $swish = new Swish('/usr/local/apache/htdocs/swish/index.swish-e'); $swish = new Swish('/var/www/html/pdf2/index.swish-e'); // get and run query from command-line $queryStr = htmlentities($_POST['q']); $result = $swish->query($queryStr); ?> Found <?php echo $result->hits; ?> match(es) for '<?php echo $queryStr; ?>'. <?php // iterate over result set // print details for each match while($r = $result->nextResult()) { ?> <p> <?php echo $r->swishreccount; ?> <strong> <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.') ; ?>"> <?php echo $r->swishdocpath; ?> </a> </strong> (score: <?php echo $r->swishrank; ?>) <br/> <?php echo $r->swishdocpath; ?><br /> <?php $file = '/var/www/html/active_colist.csv'; $fh = fopen($file, 'r'); $companies = array(); $row = fgetcsv($fh, 1024); // ignore header while ($row = fgetcsv($fh, 1024)) { $companies[$row[0]] = array('company' => $row[1], 'country' => $row[3]); //changed line } fclose($fh); //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $wvb_number = substr($filenames[1],1,12); $country = substr($filenames[1],1,3); echo 'Country: '.$companies[$wvb_number]['country']."<br />"; //echo 'Country Name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year."<br />"; //$filenames = explode(".", $r->swishdocpath); //$wvb_number = substr($filenames[1],1,12); echo 'WVB Number: '.$wvb_number."<br />"; echo 'Company Name: '.$companies[$wvb_number]['company']; //echo 'Country: '.$companies[$wvb_number]['country']; ?> </p> <?php } } catch (Exception $e) { die('ERROR: ' . $e->getMessage()); } } ?> </body> </html> My question is what would be the best way incorporate this into my php file so that I am able to display a limit number link by page so that not all of the results are listed on the same page? If that is even possible.
  14. I changed some code around and I was able to resolve it.
  15. So in order to do this I would just move some code around then? How would I do this?
  16. All right. I made those changes but now it is skipping a line for some reason. Let me show you what I mean. When I took a look at my results I saw that the country code had skipped a line over. When I did the following: [root@zeus html]# grep IDN000030159 active_colist.csv "IDN000030159","FAJAR SURYA WISESA","IDN","Republic of Indonesia" I saw the above result. However if you take a look at my search results for this particular item, the line for that particular country is being skipped and as you can see Republic of Indonesia is supposed to correspond with ./IDN000030159.2013.A.00.E.12.31.PDF: 2 ./IDN000030159.2013.A.00.E.12.31.PDF (score: 1000) ./IDN000030159.2013.A.00.E.12.31.PDF Country: Year: 2013 WVB Number: IDN000030159 Company Name: FAJAR SURYA WISESA 3 ./ZWE000030003.2013.A.00.E.02.28.PDF (score: 1000) ./ZWE000030003.2013.A.00.E.02.28.PDF Country: Republic of Indonesia Year: 2013 WVB Number: ZWE000030003 Company Name: ECONET WIRELESS ZIMBABWE Is there a way to correct this so that the .csv file is being read correctly with the proper code: <?php $file = '/var/www/html/active_colist.csv'; $fh = fopen($file, 'r'); $companies = array(); $row = fgetcsv($fh, 1024); // ignore header while ($row = fgetcsv($fh, 1024)) { $companies[$row[0]] = array('company' => $row[1], 'country' => $row[3]); //changed line } fclose($fh); //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $country = substr($filenames[1],1,3); echo 'Country: '.$companies[$wvb_number]['country']."<br />"; //echo 'Country Name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year."<br />"; //$filenames = explode(".", $r->swishdocpath); $wvb_number = substr($filenames[1],1,12); echo 'WVB Number: '.$wvb_number."<br />"; echo 'Company Name: '.$companies[$wvb_number]['company']; //echo 'Country: '.$companies[$wvb_number]['country']; ?>
  17. You could store the csv data in an array $file = '/var/www/html/active_colist.csv'; $fh = fopen($file, 'r'); $companies = array(); $row = fgetcsv($fh, 1024); // ignore header while ($row = fgetcsv($fh, 1024)) { $companies[$row[0]] = $row[1]; } fclose($fh); then, when you have the $wvb_number echo $companies[$wvb_number]; Okay I just put in a new .csv file. I haven't made changes to my code yet because I am afraid I might mess something up. Now my question is how would I go about changing the code so that the full country name is displayed? This is what is inside the new .csv file: "AIA000030001","THE NATIONAL BANK OF ANGUILLA","AIA","Anguilla" "AIA000030003","ANGUILLA ELECTRICITY COMPANY","AIA","Anguilla" "AIA000030005","KMT-HANSA","AIA","Anguilla" "ALB000040001","BURSE E TIRANES","ALB","Albania" "ANT000020000","RORENTO","ANT","Netherlands Antilles" "ANT000030001","INTRUM JUSTITIA","SWE","Kingdom of Sweden" This is what the code currently looks like: <?php $file = '/var/www/html/active_colist.csv'; $fh = fopen($file, 'r'); $companies = array(); $row = fgetcsv($fh, 1024); // ignore header while ($row = fgetcsv($fh, 1024)) { $companies[$row[0]] = $row[1]; } fclose($fh); //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $country = substr($filenames[1],1,3); echo 'Country Name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year."<br />"; //$filenames = explode(".", $r->swishdocpath); $wvb_number = substr($filenames[1],1,12); echo 'WVB Number: '.$wvb_number."<br />"; echo 'Company Name: '.$companies[$wvb_number]; ?> This is what the current output looks like: 3 ./ZWE000030003.2013.A.00.E.02.28.PDF (score: 1000) ./ZWE000030003.2013.A.00.E.02.28.PDF Country Name: ZWE Year: 2013 WVB Number: ZWE000030003 Company Name: ECONET WIRELESS ZIMBABWE 4 ./POL000040092.2013.A.00.E.12.31.PDF (score: 945) ./POL000040092.2013.A.00.E.12.31.PDF Country Name: POL Year: 2013 WVB Number: POL000040092 Company Name: ASSECOSEE
  18. I did just that and it worked. Thank you. If I have any other questions can I message you privately?
  19. Here is what I did and my output disappeared on me upon hitting refresh: <?php $file = '/var/www/html/active_colist.csv'; //Suggested code $fh = fopen($file, 'r'); $companies = array(); $row = fgetcsv($fh, 1024); // ignore header while ($row = fgetcsv($fh, 1024)) { $companies[$row[0]] = $row[1]; } fclose($fh); ?> <?php // iterate over result set // print details for each match while($r = $result->nextResult()) { ?> <p> <?php echo $r->swishreccount; ?> <strong> <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.') ; ?>"> <?php echo $r->swishdocpath; ?> </a> </strong> (score: <?php echo $r->swishrank; ?>) <br/> <?php echo $r->swishdocpath; ?><br /> <?php //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $country = substr($filenames[1],1,3); echo 'Country Name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year."<br />"; //$filenames = explode(".", $r->swishdocpath); $wvbnumber = substr($filenames[1],1,12); echo 'WVB Number: '.$wvbnumber."<br />"; echo 'Company Name: '$companies[$wvb_number]; //what is supposed to be outputted to the screen My question is where did I go wrong?
  20. Okay so where in my code would I put these lines of code? Do I incorporate this into what is being searched? If so, how? Keep in mind that I have never used php before so this is my first time. After this?: //$filenames = explode(".", $r->swishdocpath); $wvbnumber = substr($filenames[1],1,12); echo 'WVB Number: '.$wvbnumber; ?>
  21. I would like assistance in displaying a company name in my web search results. Below is my code: <html> <head></head> <body> <?php if (!isset($_POST['q'])) { ?> <img src="/wvb-logo-slogen.png" border="0" /> <h2>Search</h2> <form method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>"> <input type="text" name="q" size="30" /> </form> <?php } else { ?> <img src="/wvb-logo-slogen.png" border="0" /> <h2>Search Results</h2> <?php try { // create object // $swish = new Swish('/usr/local/apache/htdocs/swish/index.swish-e'); $swish = new Swish('/var/www/html/pdf2/index.swish-e'); // get and run query from command-line $queryStr = htmlentities($_POST['q']); $result = $swish->query($queryStr); ?> Found <?php echo $result->hits; ?> match(es) for '<?php echo $queryStr; ?>'. <?php // iterate over result set // print details for each match while($r = $result->nextResult()) { ?> <p> <?php echo $r->swishreccount; ?> <strong> <a href="<?php echo '/pdf2', ltrim($r->swishdocpath, '.') ; ?>"> <?php echo $r->swishdocpath; ?> </a> </strong> (score: <?php echo $r->swishrank; ?>) <br/> <?php echo $r->swishdocpath; ?><br /> <?php //Split a filename by . $filenames = explode(".", $r->swishdocpath); //get 3 chars from $filenames to $country $country = substr($filenames[1],1,3); echo 'Country name: '.$country."<br />"; //$filenames[2] = explode(".", $r->swishdocpath); $year = substr($filenames[2],0,4); echo 'Year: '.$year; //$filenames = explode(".", $r->swishdocpath); $wvbnumber = substr($filenames[1],1,12); echo 'WVB Number: '.$wvbnumber; ?> </p> <?php } } catch (Exception $e) { die('ERROR: ' . $e->getMessage()); } } ?> </body> </html> As you can see I am able now display the WVB number, country name and year. But my question to anyone is how would I display the company name that it corresponds to? The names of the company are located in a .csv file called active_colist.csv and it is under the /var/www/html directory. This is what my /var/www/html directory looks like: [root@zeus wvbadmin]# cd /var/www/html [root@zeus html]# ls -l total 2140 -rw-r--r--. 1 root root 2110323 May 14 23:39 active_colist.csv -rw-r--r--. 1 root root 6678 Apr 30 13:25 favicon.ico -rw-r--r--. 1 root root 17256 May 5 16:02 h1 -rw-r--r--. 1 root root 113 Apr 29 16:45 hello.php -rw-r--r--. 1 root root 19 Apr 24 23:53 info.php drwxr-xr-x. 2 root root 12288 May 12 15:30 pdf2 lrwxrwxrwx. 1 root root 20 May 5 15:46 pdf3 -> /home/wvbadmin/pdf3/ -rw-r--r--. 1 root root 1227 May 6 16:33 pdfsearch2.php -rw-r--r--. 1 root root 1204 May 6 15:13 pdfsearch3.php -rw-r--r--. 1 root root 1625 May 19 23:27 pdfsearch.php -rw-r--r--. 1 root root 1838 Apr 30 13:10 search.php -rw-r--r--. 1 root root 10077 May 12 11:38 wvb-logo-slogen.png What is in the .csv file is the first 12 characters that correspond to the company name. What PHP code would I use to grab the first 12 characters of search results match them up with what is in the .csv file and display the proper company name? This is what is inside of the .csv file: WVB_NUMBER,PRIMARY_SHORT_COMPANY_NAME,CURR_ISO_CNTRY_OF_INCORP "AIA000030001","THE NATIONAL BANK OF ANGUILLA","AIA" "AIA000030003","ANGUILLA ELECTRICITY COMPANY","AIA" "AIA000030005","KMT-HANSA","AIA" "ALB000040001","BURSE E TIRANES","ALB" "ANT000020000","RORENTO","ANT" "ANT000030001","INTRUM JUSTITIA","SWE" "ANT000030002","ORTHOFIX INTERNATIONAL","ANT" "ANT000030004","HAL TRUST","ANT" "ARE000030001","MASHREQBANK","ARE" "ARE000030002","COMMERCIAL BANK OF DUBAI","ARE" Any assistance would be greatly appreciated.
  22. One more thing that I would like to mention to you is that I would like to have the names of the companies displayed the names of the actually companies are in a a .csv file located under the same directory that I am running my php search script from. What would I have to put in my PHP search script so that when it runs that it would check the first 12 characters of the PDF title that are in the /var/www/html/pdf2 directory to the /var/www/html/active_colist.csv directory? The .csv file has the first 12 characters of the PDF titles as well as teh corresponding companies.
  23. Thank you for the information. Actually I am looking to do something a little bit more specific. Allow me to further elaborate. What I want to show up on my search results page is for there to be a drop down menu with the values to be 10 20 or 50 for example and if a user wants to just display 10 results per page than 10 results per page would only be displayed. What I am asking is there a correct way using PHP code to accomplish this task? What would that code even look like and does it even exist? As well as the other questions that I asked above. But that is not to say that I am not going to look into the links you gave me because I will. Do you know anyone familiar with Swish-e who would be able to assist me?
×
×
  • 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.