|
-
A Good PHP Search Engine?
Date: 04/26/05
Keywords: php, mysql, html, sql, web
I'm looking for a good PHP search engine with full text indexing, the ability to crawl pages itself, preferably MySQL storage, and advanced search options. It'd also be nice if it rendered output in streamlined xhtml, or uses Smarty but not required.
Any suggestions?
Posted in: php php_dev webdesign webdev I apologize in advance to all the people that are members of one or more of these communities
Source: http://www.livejournal.com/community/php_dev/55407.html
-
HTTP Headers...
Date: 04/26/05
Keywords: browser
A little bit of guidance, if you please...
I'm writing an application which involves the download of files. These files could be of any file, and must be downloaded as an attachment, rather than displayed in the browser.
This is the code that I'm using:
header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"".$download_realfilename."\""); header("Content-Length: ".$download_filesize); readfile ("http://www.whatever.com/docs/".$download_filename); This translates to:
Content-type: application/octet-stream Content-Disposition: attachment; filename="Repton Passwords.txt" Content-Length: 70
File contents, etc.
Firefox handles this in exactly the way I would expect. IE throws up an error: "Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later."
What am I doing wrong (obvious MS jokes aside) that Firefox would work and IE would not?
Source: http://www.livejournal.com/community/php_dev/55077.html
-
One Problem
Date: 04/25/05
Keywords: rss, xml
But there is one problem in the code what i have given in the previous entry.
it shows the entry with date, time, current mood, current music and even the number of comments in that post... But the problem i encountered in case of LJ-Cut... It doesn't keep the LJ-cut contents hiden. It shows the whole document. Coz in the XML of the entry the code is like this then followed by the entry...
Even the XML given through RSS doesn't provide any option to find where the LJ-cut ends. Can anyone help regarding this problem?
Source: http://www.livejournal.com/community/php_dev/54987.html
-
Code for fetching LJ contents
Date: 04/21/05
Keywords: web
[Error: Irreparable invalid markup (' ') in entry. Owner must fix manually. Raw contents below.]
I got a code from one of my friend... It fetches the LJ contents in your site... I modified it in appropriate places... But the main problem in this code is that, it is not a generic one. You need to change the code according to various LJ Style... Can anyone help me modifying the code to a generic one so that it suits any LJ design? Also i want to make it a template so that it can be imported anywhere... to fit the norma design of anyone's website // +-------------------------------------------------------------------------------------------+ // | ShowLJ version 0.1 // +-------------------------------------------------------------------------------------------+ // | This program is free software; you can redistribute it and/or // | modify it under the terms of the GNU General Public License // | as published by the Free Software Foundation; either version 2 // | of the License, or (at your option) any later version. // | // | This program is distributed in the hope that it will be useful, // | but WITHOUT ANY WARRANTY; without even the implied warranty of // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // | GNU General Public License for more details. // | // | You should have received a copy of the GNU General Public License // | along with this program; if not, write to the Free Software // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // | 02111-1307, USA. // | // +------------------------------------------------------------------------------------------+ // | Main Author: Mrinal kalakrishnan // | Continued By: Sumeet B Mulani // | Website: http://sumeet.info/ // | Continued By: Sutanu Mandal from SPHINX // | Website: http://www.wearesphinx.net // +------------------------------------------------------------------------------------------+ // | File: showLJ.php // | Description: Contains the PHP Function to show LiveJournal // | content in your personal website // | Last Update: 20/04/2005 // +------------------------------------------------------------------------------------------+
function showLJ() {
$ljsite=''; #Your LJ Site $LJ=file($ljsite); $copy=0; $journal=null; $rep=0; while (list ($key, $val) = each ($LJ)) { chop($val);
# This is for S1 style if ($copy==0 and ereg("^cellpadding=\"2\" cellspacing=\"0\" border=\"0\" summary=\"\" class=\"entrybox\">",$val)) { # Use the similar code for displaying S1 Style Journal }
# This is for S2 if($copy == 0 and ereg("^",$val)) { # For S2 journal Style we may need to modify the Reg-Exp $copy=1; } if ($copy==1) { $journal.=$val; } if(ereg("^ ",$val) and $copy==1) $copy=0; }
echo $journal; }
#For displaying your Livejournal call this function wherever you want
?>
Please help me to modify this code... So that, anyone can use this code for displaying LJ in their site in a customized way
Source: http://www.livejournal.com/community/php_dev/54368.html
-
Help Needed
Date: 04/14/05
Keywords: php, programming
Hi,
I am quite new to this community. I just started programming in PHP and got interest. I felt free to join this community.
I need some help for writing code in PHP...
I want to write a code to generate thumbnails of all pictures in a directory. My server supports PHP 4.3, but i don't know whether my server supports GD or not.
Without using GD is it possible to write such a code? if yes, then how?
Please help me out....
Thanx everyone
Source: http://www.livejournal.com/community/php_dev/54054.html
-
Timed Process
Date: 03/30/05
Keywords: php, rss
I have a script that will read and store in my DB a number of RSS feeds. Right now, I have to click a button to perform this process. I'd like to have the code run at a fixed interval on its own, perhaps every 30 minutes.
Is there a method for creating a timed process out of a PHP script, so that it will run automatically at specific intervals?
(I'm using shared server space, with the .bash files. Not a huge Unix guru, but can get by with some direction.)
Source: http://www.livejournal.com/community/php_dev/53608.html
-
Script Help
Date: 03/25/05
Keywords: php, mysql, browser, sql, web
Hi, I do not know how to code PHP, but I do know how to impliment PHP scripts. I've been looking for a GPL one that does the following:
Forces download (header script that forces the "save" dialog. I'm serving mp4s and I want to make sure they don't load in the browser).
Anti-Leech (hides the true URL of my mp4s, and allows only referring servers I've entered into the script to download, otherwise people are redirected to the page of my choice)
Download Counter (either flat files or MySQL).
And that's it. I found scripts that do bits and pieces of this, but only one that does it all—and you have to pay for it (you can actually use it for free but it appends the site's name to the downloaded files unless you register the pro version). This script is called "Download Center Lite" and can be found at www.Stadtaus.com. I tried to crack it, but they've done clever things in the script to prevent that.
Also, I've found "Download Centers" that do much of these, but that's just for having a specific page with download links. I want to be able to dynamically call to these mp4 links from various pages on my website, not just from one.
Ideas?
This message was also posted in the LJ community "PHP."
Source: http://www.livejournal.com/community/php_dev/53455.html
-
php mod_rewrite
Date: 02/27/05
Keywords: php, asp
Hi everyone,
I'm new in this community. I just recently learning about php (coming from asp background). I'm sure there are some people out there who is in the similar situation like me...(do you get mixed up writing the code sometimes? lol). Anyway, I just found out about mod_rewrite, just want to double check if this is what you use to make query string more search engine friendly? I had a look at the manual too..is there simpler explanation/tutorial available?
Source: http://www.livejournal.com/community/php_dev/53016.html
-
First post(phpmyadmin not working)
Date: 02/18/05
Keywords: php, mysql, sql
alright first post, mysql ver 4.1 installed, running off of a winxppro operating system.
I have phpmyadmin-2.6.0-pl1 on my home computer, and whenever I try to logon as root using the password I specified it says "Error #1251 - Client does not support authentication protocol requested by server; consider upgrading MySQL client"
Source: http://www.livejournal.com/community/php_dev/52920.html
-
Polling script
Date: 02/11/05
Keywords: php, web
Hello everyone.. don't really post too much in here, but I thought i'd get some input from everyone. For the past few days, I was interested in how GD works, so I decided to write a script that would put it to use. I decided to write a poll for one of my clients, and it seems to be working pretty well. Heres a quick idea of how it works.
- Poll module is loaded at the beginning of the script (before output) (will go into modules more in a minute) -- Just sets an array containing the very basic config of the poll (which db tables to use and whatnot) and also contains cookie information.
- $cfg_poll['poll'] is set to tell which poll to load.
- submodule 'poll_load' is loaded. -- DB is queried getting a bit of info on the pull (question being asked, size of poll graph, etc. -- DB is also queried to see if an IP matching the remote_addr exists in the answer table -- Last but not least, check if cookie exists for answering the poll
If the last two things are matched, load poll_results, which just gets the answers from a db, and shows a graphical display of the poll.
If those two aren't matched, display a form for submitting your answer to the poll.
Anyways, if anyone has some input on this, that'd be great. I'll throw up an example when I get some real webspace. As you can see, this whole thing is done from a DB, and is fully customizable.
Also, the whole 'module' is because this script runs off of mod_core.php, a script I wrote for making large projects easier. In short, modules are made, sub-modules can be loaded, contains debug info, etc.... Doesn't hurt too much on CPU usage either.
Thanks, ~ Fanaticus
Source: http://www.livejournal.com/community/php_dev/52493.html
-
Pear::DB vs. ADOdb?
Date: 02/03/05
Keywords: php, mysql, database, sql, java, google
I'm sure this is going to create a firestorm of debate, but I'm tired of spending countless hours on Google. Before doing PHP, I was a Perl/Java programmer, and was used to doing database stuff with DBI in Perl more than anything else. I'm presently writing a PHP/MySQL app, which will be ported over to Oracle, so I'm looking to start using an abstraction layer (something I admittedly should've been doing the whole time). I've researched ADOdb and Pear::DB, and I can't make up my mind. Would some of you folks mind sharing your personal experiences?
Thanks!
Source: http://www.livejournal.com/community/php_dev/52325.html
-
POSTing and redirecting
Date: 02/02/05
Keywords: php, browser, database, java
I'm in a situation where I want to create a page that redirects to another site and posts as it does so, as if it were a form (the page needs to record acceptance in a database before the site-user hares off into the unknown, possibly not to return). Is there a way of manually setting these post values in php? header() just seems to apply to the page you're in. I can't rely on Javascript, and somehow sending the post variables to the other site and mirroring the result of the first page on my site would be commercially problematic. Help!
Thinking about this, there just doesn't seem to be a solution. Header sets HTTP header variables in the document that goes back to the user's browser, not the second server. POST variables would usually be provided by the user's browser to the second server, not by the first server. I just don't think that there's a way of doing this kind of redirection, but I may be wrong, it's not really my area.
Fascinating problem, would anybody like to comment?
Source: http://www.livejournal.com/community/php_dev/52088.html
-
OOP Question
Date: 01/04/05
Keywords: php
Ok, so it appears that in PHP5, when declaring variables within a class, "var" is being depricated, and "public, private, protected" are the preferred descriptors for a variable type. I see that using "var $varname" is still allowed, and PHP5 just makes it a public variable by default. Is there a way to keep a variable private or protected within a class in PHP4? And have it work in PHP5?
BTW, has anyone else made the switch from v4 to v5 and encountered any gotchas along the way?
[X-posted to PHP]
Source: http://www.livejournal.com/community/php_dev/51280.html
-
Security in websites, part deux....
Date: 01/02/05
Keywords: php, html, database, sql, java, security, web
alright, so, i finally got around to designing my 'security system' for my family's website. here's how it'll work:
- user enters their username and password into an html form. a javascript function will confirm that both are between 6 and 16 characters long
- if they, are, they'll be passed to login.php which will double check the lenghts of the two strings, and then confirm that neither one contains anything but letters and numbers. if they don't pass muster, the user gets rerouted to the html login form.
- if the above two criteria evaluate to true, then a SQL query will run to see if there's a matching username and password row in a database.
- IF SO, the script calls session_start() and $_SESSION['UsrIsLogdIn']=true;. the script then redirects them to the rest of the site.
now, each page on the rest of the site will do a check like this: if ($_SESSION['UsrIsLogdIn']!==true) { header("Location:index.php"); exit(); }
do you all think that this is good security? do you see any problems, loopholes, other ways in or ways to emulate the session variable being set to true? is there anything else i should add or make the pages check for?
thanks for your help :)
[Edit: oh, and what do you think is the best way to handle the user logging out? just setting $_SESSION['UsrIsLogdIn'] to false?]
Source: http://www.livejournal.com/community/php_dev/51178.html
-
URL Handling...
Date: 12/31/04
Keywords: php, apache
I hate mod_rewrite. There, I said it.
I've noticed that LiveJournal uses its own form of URL handling in Perl, by the use of the PerlRequire directive. What I presume that it does, is pass the URL to the specified script, allows processing for special cases (i.e. /users/, /community/, etc) but then passes the URL back to Apache for all unhandled URLs.
Does PHP allow this kind of processing? Can I combine Perl and PHP in this manner?
Source: http://www.livejournal.com/community/php_dev/50880.html
-
security in websites
Date: 12/29/04
Keywords: php, mysql, browser, database, sql, security, web
i am preparing to design a website for my family. i'd like it to have a secure log-in, which references usernames and passwords in a mysql database. i'd like the rest of the website to be secure, meaning, if you're not logged in, you're redirected to the index. i'm planning to use sessions with cookies. as i'm relatively new to security in web design, i'd like some advice.
i know the login.php script will check the username and password against a corresponding user table. if the login succeeds, a call will be made to session_start(). session_start() will be called on all subsequent pages, as well as a check to see if the login status is true (or something like that). herein is my first question: what should each subsequent page of the site check for?
do i need to turn SSL on or will sessions, cookies and a database be enough? (it doesn't need to be super tight--mainly, some of my aunts and uncles don't want the pictures of their bikini clad daughters from our beach trips accessible to just anyone over the net.)
... i guess i'm not entirely sure what else to ask. i suppose that i'll need to make each page check to see if the above mentioned login status variable is set to true, but how do i set it to false? do i just design the session or cookie to expire when the browser is closed?
any help or feedback is appreciated. if you know of a good site (that's easy to understand) which goes over what you need to do to design s secure site, please let me know.
ah, by the way, the environment i'm designing this site for is a RedHat server with PHP4.3.9 and MySQL4.0
thanks for your help
Source: http://www.livejournal.com/community/php_dev/50687.html
-
PROTECT YA NECK!!!
Date: 12/23/04
Keywords: php, virus, web
hey, my name is Phil. i started learning PHP back in september. for some reason it didn't occur to me until now to join some lj communities about it. i just did some poking around about what looked like a virus going around some good sites and thought i'd leave a note about it, sorry if this is old news for you all:
for those of you who run your own websites, there is a nasty worm going around servers with older versions of phpBB2 installed. it's called NeverEverNoSanity; if you go to a website and see a black background with red text which says "This site has been defaced!" then you know it got hit. anyway, upgrading to the latest version, phpBB 2.0.11 is supposed to fix the problem. just thought i'd let you know.
here's a link: php.BB.com :: View topic - PHP exploits and phpBB.
-P.
Source: http://www.livejournal.com/community/php_dev/50288.html
-
OK, take two...
Date: 11/28/04
Keywords: php, html
Just VNCed in to my mom's machine to get the file. I did a test upload again to get the error.
Fatal error: Allowed memory size of 8388608 bytes exhausted at (null):0 (tried to allocate 4096 bytes) in /srv/www/htdocs/jeff/phpnuke/html/modules/My_Album/thumbnail.php on line 42
Line 42: $this->img["src"] = ImageCreateFromJPEG ($imgfile);
It successfully uploads the two pictures. However, only the first thumbnail is created. It gets completely through the routine the first time around.
Not sure why it freaks the second time around. On a hunch, I took the files and tried them locally, but I get the same error.
Is there something that could be at issue with the images themselves? The are just digital camera pictures.
Looks like more testing.
Any ideas?
Source: http://www.livejournal.com/community/php_dev/50028.html
-
Tomcat hosts?
Date: 11/17/04
Keywords: php, mysql, database, sql, web
(x-posted all over the damn place)
I am currently looking for a good web host that offer Tomcat AND php AND some kind of database (MySQL or PostGres - I'm not picky). I'd also like to go with someone who has a sane usage policy (I once had a site yanked by addr.net due to "inappropriate content").
Currently, http://www.oxxus.net/ looks pretty good.
Anyone have any other suggestions?
Source: http://www.livejournal.com/community/php_dev/49616.html
-
Smarty vs PEAR template packages
Date: 09/28/04
Keywords: php, html, web
cross posted in php
i'm about to rewrite a website and i'd like to use a template engine for it. i'm going to base the bulk of it on PEAR, but i'm not sure about which template package to use.
of the PEAR template packages, at this stage i'm considering using HTML_Sigma. but i'm also looking into Smarty.
i haven't used Smarty or any of the PEAR template packages before and i've only just started playing with Smarty.
so what do people think is better: PEAR or Smarty?
and why?
Source: http://www.livejournal.com/community/php_dev/48674.html
|