1. Attention Distraction Disorder of Computer Users

    Date: 02/12/05 (Java Web)    Keywords: rss, google

    I think many of us, including myself, often find ourselves distracted while doing a job on computer. The distractions could range from checking email, IM, checking RSS feeds of latest news or getting sucked into google mode and continuing browsing, in detrement to the work at hand. Personally I get...

    Source: http://feeds.feedburner.com/AngsumansBlogOnJavaAndWebTechnologies?m=141

  2. Which Wiki

    Date: 02/18/05 (Web Development)    Keywords: php, mysql, rss, xml, sql, java

    I’m thinking about putting together a Wiki for some stuff I am doing. Does anyone have any packages that they like and would recommend? Things I would like:

    1) PHP (V5 would be a good thing)
    2) Data stored in MySQL
    3) User names to edit as an option.
    4) New/changed Pages RSS feed.
    5) Under active development
    6) There is no #6
    7) Page versioning.
    8) Good support for inserting code of various forms (PHP, javascript, xml etc) in pages.

    Thanks

    --Zach

    Source: http://www.livejournal.com/community/webdev/173178.html

  3. Attention Distraction Disorder of Computer Users

    Date: 02/12/05 (Java Web)    Keywords: rss, google

    I think many of us, including myself, often find ourselves distracted while doing a job on computer. The distractions could range from checking email, IM, checking RSS feeds of latest news or getting sucked into google mode and continuing browsing, in detrement to the work at hand. Personally I get most distracted with great ideas popping [...]

    Source: http://blog.taragana.com/index.php/archive/attention-distraction-disorder-of-computer-users/

  4. Some Jobs

    Date: 01/20/05 (IT Professionals)    Keywords: rss, technology, database, web

    If any of you are looking for jobs, check out International Legal Technology Association's Available Positions webpage.

    I work for a law firm as a database administrator and I really enjoy it. The company I work for has been around for over 100 years and they are really great with benefits. In short, law firm tech jobs can rock.

    Some of the jobs listed are...
    Database Administrator - Cleveland, OH
    Desktop/Network Support Analyst - San Diego, CA
    Application Developer - Los Angeles, CA
    Senior Network Engineer - New York, NY

    It's updated almost daily. I asked them for an RSS feed but haven't heard back :|

    Source: http://www.livejournal.com/community/itprofessionals/1842.html

  5. Yahoo adds syndication feature to mobile service

    Date: 03/11/05 (Web Technology)    Keywords: rss, software, yahoo

    New software will allow mobile phone users to get RSS feeds from their My Yahoo page.

    Source: http://news.zdnet.com/Yahoo+adds+syndication+feature+to+mobile+service/2100-9588_22-5610982.html?part=rss&tag=feed&subj=zdnn

  6. JavaBlogs and WordPress loves to repost old blog entries

    Date: 03/12/05 (Java Web)    Keywords: rss, java

    I have been playing with my blog to find the optimum number of messages to make available from the main page. Somehow that triggered JavaBlogs to think that all of these entries are new and publish them! Let me say it again. Dave Winer you did a good job in developing RSS. You did a [...]

    Source: http://blog.taragana.com/index.php/archive/javablogs-and-wordpress-loves-to-repost-old-blog-entries/

  7. advanced parsing

    Date: 03/17/05 (Computer Help)    Keywords: rss

    If you are bored, perhaps you can help me with this problem, its for someone on a forum I go on...



    The file is formatted like this

    1 crux
    The problem that is the hardest to solve
    The crux shadows
    2 addendum
    An addition
    Addendum for those who submit combos
    3 groggy
    Half asleep and crabby
    I’m groggy still
    4 crabby
    Grumpy
    Being half asleep and crabby

    (the number doesnt matter really, because that can be added in later)

    And I need to get it like this

    crux, The problem that is the hardest to solve, The crux shadows
    addendum, an addition, Addendum...
    groggy, ....

    so basically it can be read into excel as a csv file.
    So far I have it like this:

    crux,
    The problem that is the hardest to solve,
    The crux shadows,

    addendum,
    An addition,
    Addendum for those who submit combos,

    groggy,
    Half asleep and crabby,
    I’m groggy still,

    (those are commas at the ends of the lines, although they look like periods/full stops)
    ....

    so basically i need to join up all lines with a comma at the end... any ideas??

    My script reads like this so far:

    cat words.txt |
    sed 's/$/\,/g' | #adds commas to end of each line
    tr -d '1''2''3''4''5''6''7''8''9''0' | #removes all numbers
    sed 'n;n;G;' > words.csv #adds a new line every forth line


    #sed -e :a -e '/\\$/N; s/\\\n//; ta' #should join up all lines with BACKSLASHES at the end

    How can I modify the last line to make it join up lines ending in the commas?

    Source: http://www.livejournal.com/community/computer_help/356807.html

  8. Timed Process

    Date: 03/30/05 (PHP Development)    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

  9. One Problem

    Date: 04/25/05 (PHP Development)    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

  10. Google tests out blog ad service

    Date: 04/26/05 (Web Technology)    Keywords: rss

    New variation of AdSense allows publishers to send text or banner ads alongside syndicated content using RSS.

    Source: http://news.zdnet.com/Google+tests+out+blog+ad+service/2100-9588_22-5685324.html?part=rss&tag=feed&subj=zdnn

  11. I'm having a problem...

    Date: 04/28/05 (PHP Community)    Keywords: mysql, rss, html, xml, database, sql

    Alright, I'm having a bit of a problem.

    I've set up a page to read and parse RSS feeds. It works for the most part. The feed names and addresses are pulled from a mysql database okay. The problem lies in putting them onscreen. At some point, variables are not being dropped or overwritten, and I'm getting the same results repeated, but with the count number of the second feed.

    See what I mean?

    This is the code:


    -- Begin Code --



    include (" [ sql stuff ]");

    $sql = "SELECT * FROM rss_feeds";

    $results = mysql_query($sql);

    while ($myrow = mysql_fetch_array($results))
    {


    $feedtitle = $myrow['name'];
    $feedurl = $myrow['url'];
    $xfeed = $myrow["feed"];
    $maxcount = $myrow['num_items'];


    $xmlfile = fopen("$xfeed", "r");
    if(!$xmlfile)die("This doesn't work");
    $readfile = fread($xmlfile ,100000);
    $searchfile = eregi("< item>(.*)< /item>", $readfile ,$arrayreg);
    $filechunks = explode("< item>", $arrayreg[0]);
    $count = count($filechunks);

    if ($maxcount > $count)
    {
    $maxcount = $count;
    }


    echo "< a href=\"$feedurl\">$feedtitle< /a>< br>";


    for($i=1 ; $i<=$maxcount ; $i++)
    {


    eregi("< title>(.*)< /title>",$filechunks[$i], $title);
    eregi("< link>(.*)< /link>",$filechunks[$i], $link);
    eregi("< pubDate>(.*)< /pubDate>",$filechunks[$i], $pubdate);
    eregi("< description>(.*)< /description>",$filechunks[$i], $description);

    $pubdate = "$pubdate[1]";
    $xlink = "$link[1]";
    $xtitle = "$title[1]";
    $xdescription = "$description[1]";

    $xdescription = html_entity_decode($xdescription);
    $xdescription = strip_tags($xdescription);


    $xday = substr($pubdate, 5, 2);
    $xmonth = substr($pubdate, 8, 3);
    $xyear = substr($pubdate, 12, 4);

    $monthnames = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
    $monthnumbers = array("01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12");

    $ymonth = str_replace($monthnames, $monthnumbers, $xmonth);

    $articledate = date("F jS, Y", mktime(0, 0, 0, $ymonth, $xday, $xyear));

    echo "< span style=\"text-transform: capitalize;\">< a href =\"$xlink\" target=\"_blank\">$xtitle< /a>< /span>< br>";
    echo "$articledate< br>";
    echo "$xdescription< br>";

    }

    }


    -- End Code --



    Anyone have any idea what could be causing this?

    NOTE: It looks now to be a problem with the one RSS feed itself, and not the code

    Source: http://www.livejournal.com/community/php/292485.html

  12. Firefox news readers

    Date: 04/28/05 (Mozilla)    Keywords: rss, browser

    According to MozillaZine.org, NewsForge has an article that evaluates some of the news reader extensions that exist for Firefox.

    Now, I used to use Thunderbird for my RSS and ATOM feeds, until I discovered SAGE. I switched mainly because I like how SAGE operates inside my browser- even though I still use Thunderbird for other reasons.

    I was curious though, what does everybody else here use to manage their RSS/ATOM feeds? Or maybe some of you don't even use news feeds, if so why not- maybe you haven't found a good enough aggregator yet?

    Anyways, feedbacks appreciated. ^_^

    X-posted to '[info]'firefoxusers and '[info]'mozilla

    Source: http://www.livejournal.com/community/mozilla/278533.html

  13. One doubt about php_dev

    Date: 05/07/05 (PHP Development)    Keywords: php, rss, web, google

    I found a website in Google which fetches the LJ content of '[info]'php_dev, is it the official site of PHP-Dev Community?

    If it is so, then i'll suggest some changes in that website and we can try the code i wrote in my earlier post. Also we have many efficient web designers in this community who can design that site very nicely.


    BTW, did anyone find the solution to identify the LJ-Cut? What '[info]'acidofil wrote against my earlier post about Lj-Cut, am afraid that LJ-cut can't be recognised in that way through RSS. If anyone can give the code then it'll be helpful

    Source: http://www.livejournal.com/community/php_dev/56720.html

  14. Code for Fetching LJ Community Contents through RSS

    Date: 05/09/05 (PHP Community)    Keywords: rss, xml, web

    [Error: Irreparable invalid markup ('') in entry. Owner must fix manually. Raw contents below.]

    I wrote a code for Fetching LJ content of a community. Am using RSS here. I wrote one XML Parser, It displays the entries in proper format (User can modify the code for his/her choicable format). It also displays the user name and userpic of the person who posted the entry in the community, also it counts the number of comments for that post and displays the comment count.
    Also it displays the current music, current mood and the mood icon used for that entry.

    This code will be helpful when someone is designing a website for a community and wants to fetch the LJ contents in the site...

    I've not yet tested the code for all types of design. If anyone can test the code and find the errors and fix them, it'll be helpful for everyone...



    // +----------------------------------------------------------------------+
    // | CommunityLJcatch version 1.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. |
    // | |
    // +----------------------------------------------------------------------+
    // | Author: Sutanu Mandal from SPHINX |
    // | Website: http://www.wearesphinx.net |
    // +----------------------------------------------------------------------+
    // | File: fetch.php |
    // | Description: Contains php code and XML parser to fetch |
    // | Livejournal Entries from Community LJ Page |
    // | Last Update: 22/04/2005 |
    // +----------------------------------------------------------------------+

    // Basic Requirements
    $community="wearesphinx"; // Mention your community name here
    $backend = "http://www.livejournal.com/community/".$community."/data/rss/";

    // End

    // variables needed later
    $insideitem = false;
    $tag = "";
    $title = "";
    $description = "";
    $link = "";

    $mood = "";
    $music = "";
    $comment = "";
    $datetime = "";
    // end

    function startElement($parser, $tagName, $attrs) {

    // The function used when an element is encountered

    global $insideitem, $tag;

    if ($insideitem) {

    $tag = $tagName;

    } elseif ($tagName == "ITEM") {

    $insideitem = true;
    }

    }

    function characterData($parser, $data) {

    // The function used to parse all other data than tags

    global $insideitem, $tag, $title, $description, $link, $mood, $music, $comment, $datetime;

    if ($insideitem) {

    switch ($tag) {
    case "TITLE":
    $title .= $data;
    break;
    case "DESCRIPTION":
    $description .= $data;
    break;
    case "LINK":
    $link .= $data;
    break;
    case "COMMENTS":
    $comment .= $data;
    break;
    case "LJ:MUSIC":
    $music .= $data;
    break;
    case "LJ:MOOD":
    $mood .= $data;
    break;
    case "PUBDATE":
    $datetime .= $data;
    break;
    }

    }

    }

    function endElement($parser, $tagName) {

    // This function is used when an end-tag is encountered.

    global $insideitem, $tag, $title, $description, $link, $mood, $music, $comment, $datetime, $community;

    if ($tagName == "ITEM") {

    /*Code for finding the entry ID*/
    $linkid=preg_split('[/]',trim($link));
    $entryfile=$linkid[count($linkid)-1];
    list($entryname,$dummy)=split('[\.]',$entryfile);

    // Find the Date and time of Post
    $datearray=preg_split('[ ]',$datetime);
    if(empty($title))
    {
    $title="Nothing to say Baby";
    }
    printf("

    ", // make our title into an actual link
    htmlspecialchars(trim($title))); // remove html characters from the title

    //--------------------------------------------------------------------
    // Find out the user who made the post

    print "
    ";
    $ljfile="http://www.livejournal.com/community/".$community."/".$entryname.".html";

    $content=file_get_contents($ljfile);
    chop($content);
    $val=strstr($content,"");
    if($pos1<$pos2)
    {
    $str1=strstr($str1," $pos1=strpos($str1,">");
    $moodpic=trim(substr($str1,0,$pos1));
    }
    else
    $moodpic="";



    // Find out number of comments in that post
    $commentcount=count(explode("talk-comment",$content))-1;

    #fclose($LJ);
    $val=false;


    //-------------------------------------------------------------------------
    // Continue with the formatting of the entry

    if(!empty($mood))
    print("Current Mood: $mood&nbsp;$moodpic
    ");
    if(!empty($music))
    print("Current Music: $music
    ");

    printf("

    %s

    ",$description); // Print out the live journal entry # Original


    /* Code for display number of comments, Link to comment page, Edit Entry, Add Memory*/
    if($commentcount>0)
    {
    if($commentcount>1)
    printf("$commentcount Comments",trim($link));
    else
    printf("$commentcount Comment",trim($link));
    }
    else
    printf("Permanent Link",trim($link));
    $comment=trim($comment);
    if(!empty($comment))
    print(",&nbsp;&nbsp;Leave Comments,&nbsp;&nbsp;");


    print("
    \"Edit
    ");

    print ("&nbsp;&nbsp;
    \"Add src=\"http://stat.livejournal.com/img/btn_memories.gif\" />
    ");


    printf ("
    \n"); // Make a line inbetween entries.
    $title = $description = $link = $insideitem = $mood = $music = $comment = false;
    }

    }

    // Now to the parsing itself. Starts by creating it:

    $xml_parser = xml_parser_create();

    // Then setup the handlers:

    xml_set_element_handler($xml_parser, "startElement", "endElement");
    xml_set_character_data_handler($xml_parser, "characterData");

    // Open the actual datafile:

    $fp = fopen($backend, "r");

    // Run through it line by line and parse:

    while ($data = fread($fp, 4096)) {
    xml_parse($xml_parser, $data, feof($fp))
    or die(sprintf("XML error: %s at line %d",
    xml_error_string(xml_get_error_code($xml_parser)),
    xml_get_current_line_number($xml_parser)));
    }

    // Close the datafile

    fclose($fp);

    // Free any memmory used

    xml_parser_free($xml_parser);

    ?>



    But in this code the problem is that it doesn't recognise LJ-cut and doesn't do caching.

    If anyone modifies the code and make it efficient then it'll be helpful :)

    Source: http://www.livejournal.com/community/php/296862.html

  15. XML?

    Date: 05/09/05 (Computer Geeks)    Keywords: rss, xml, web

    What's the best - and free - way to add XML syndication feeds to a website?

    I'm working on my own site right now (unfortunately, I can't make the whole thing live until the DNS changes to my GoDaddy domain go through), and my goal is to have three separate blogs through Blogger.com...and I want to display a feed from the two secondary blogs on my front page (like have a section for a secondary blog, containing links and the first few lines from each article in that blog...). I know I can use FeedBurner to convert my Atom XML feeds to RSS, but either way, how do I make my site display the XML information?

    Thanks in advance!

    Source: http://www.livejournal.com/community/computergeeks/680022.html

  16. XML Encoding

    Date: 05/26/05 (PHP Community)    Keywords: rss, html, xml

    I'm writing a lib to produce RSS/Atom feeds for a site.

    I have the character “ in some stories.

    I have done htmlspecialchars($title), however, this still produces a character that feedvalidator.com don't like in the XML.

    How should I correctly trap/encode this (and other similar) characters?

    Source: http://www.livejournal.com/community/php/301066.html

  17. Any Thunderbird RSS gurus out there?

    Date: 05/31/05 (Mozilla)    Keywords: php, rss, html, xml, web

    I just started using Thunderbird as an RSS reader and I'm noticing strange behavior with my feed. If I load up http://www.perturb.org/rss.php in thunderbird the entries it displays are links to web pages. When I view one of those feeds it shows that entry as it is embeded on the webpage. If I look at one of the entries from http://www.lessig.org/blog/index.xml the entry shows the raw text that's in the RSS feed no HTML requests made.

    Considering the first feed is from my blog, how do I make Thunderbird show the raw content, instead of the HTML. It's exported correctly. Bloglines sees the content just fine. Is there a Thunderbird setting I'm missing?

    Source: http://www.livejournal.com/community/mozilla/287317.html

  18. RSS newsreaders

    Date: 06/08/05 (Computer Geeks)    Keywords: rss

    Hello, I am interested in getting an RSS newsreader, but I am looking for one with a scrolling bar which would be able to be placed on the top or bottom of my screen (if anyone knows what Winbar is, think of something like that). So far all I have found is newsreaders which come in window format, but which don't have a bar feature (like a stock ticker). If anyone knows of something like this, I would like to know (preferably open source).

    Source: http://www.livejournal.com/community/computergeeks/703120.html

  19. aggregate rss or atom feeds

    Date: 06/09/05 (Web Development)    Keywords: rss

    I want a tool or service that i can give multiple rss and/or atom feed url's to, and get back an aggregation.

    LiveJournal itself is pretty great at this... but I need the aggregation to be programmatic and on-the-fly.

    This could be best solved with source code. I'd imagine someone might rent a service that does this well already.

    Open to ideas. YOUR ideas.

    Source: http://www.livejournal.com/community/webdev/208807.html

  20. PHP doesn't wanna write to a text file.

    Date: 06/09/05 (PHP Community)    Keywords: php, mysql, rss, database, sql, web

    Okay, I'm having a bit of a problem here... I'm trying to create an RSS feed from my MySQL database. Unfortunately though, I can't seem to write to a file. PHP isn't running in safe mode, and the enclosing folder permissions don't seem to make a difference. The file gets created, but no writing occurs, and if the 'is_writeable' statement is taken out, the script runs until it times out and gives an error 500. Anyone have any clues?

  21. $str1=strstr($val," $pos1=strpos($str1,'>');
    print "
    ";
    for($index=0;$index<=$pos1;$index++)
    print($str1{$index});
    echo "
    &nbsp;&nbsp;&nbsp;$datearray[1]&nbsp;$datearray[2]&nbsp;$datearray[3]&nbsp;$datearray[4]&nbsp;$datearray[5]";
    echo "
    ";
    $pos1=false;
    $str1=false;
    $str1=strstr($val,"http://www.livejournal.com/userinfo.bml?user=");
    $pos1=strpos($str1,'>');
    $pos2=0;
    $username=trim(substr($str1,45,$pos1-46));
    print("

    [info]
    $username

    \n");
    $pos1=false;
    $pos2=false;
    $str1=false;
    $str1=strstr($content,"Current mood:");
    $pos1=strpos($str1," $pos2=strpos($str1,"

    error_reporting(1);

    include("sqlstuff.inc");


    $filepointer = fopen("/kunden/homepages/28/d58558265/htdocs/rss/news.rss", "w+") or die ("can't open file");


    if (is_writeable($filepointer))
    {


    $contents = "\r";
    // $contents .= "http://my.netscape.com/publish/formats/rss-0.91.dtd'>\r";
    $contents .= "\r";
    $contents .= "\t\r";
    $contents .= "\t\tCopyright 2005 Jamie Nazaroff\r";

    $rightnow = date("D, d M Y h:i:s T");

    $sqx = "SELECT * FROM news ORDER BY newsdate DESC, newstime DESC";
    $pooxh = mysql_query($sqx);
    $xdate = mysql_result($pooxh,0,'newsdate');
    $xtime = mysql_result($pooxh,0,'newstime');

    $xyear = substr($xdate, 0, 4);
    $xmonth = substr($xdate, 5, 2);
    $xday = substr($xdate, 8, 2);

    $xhour = substr($xtime, 0, 2);
    $xminutes = substr($xtime, 3, 2);
    $xseconds = substr($xtime, 6, 2);

    $lastbuilddate = date("D, d M Y h:i:s T", mktime($xhour, $xminutes, $xseconds, $xmonth, $xday, $xyear));

    $contents .= "\t\t$rightnow\r";
    $contents .= "\t\t$lastbuilddateBuildDate>\r";
    $contents .= "\t\tmysite.com News\r";
    $contents .= "\t\ten-us";
    $contents .= "\t\thttp://www.mysite.com/?mode=news\r";
    $contents .= "\t\tLALALA\r";
    $contents .= "\t\t\r";
    $contents .= "\t\t\thttp://mysite.com/\r";
    $contents .= "\t\t\tLALALA\r";
    $contents .= "\t\t\thttp://www.mysite.com/rssbuttonnews.gif\r";
    $contents .= "\t\t\t31\r";
    $contents .= "\t\t\t88\r";
    $contents .= "\t\t\r";
    $contents .= "\t\twebmaster@mysite.com (Jamie Nazaroff)\r";
    $contents .= "\t\twebmaster@mysite.com (Jamie Nazaroff)\r";

    $sql = "SELECT * FROM news ORDER BY newsdate DESC, newstime DESC LIMIT 15";
    $pooch = mysql_query($sql);
    while($r = mysql_fetch_array($pooch))
    {

    $contents .= "\t\t\r";

    $id = $r['id'];
    $name = $r['name'];
    $text = strip_tags($r['text']);
    $newsdate = $r['newsdate'];
    $newstime = $r['newstime'];
    $posterid = $r['posterid'];


    $number = 400;

    while (substr($text, 0, $number) != " ")
    {
    $number = $number - 1;
    }

    $text = substr($text, 0, $number - 1);

    if (substr($text, -1, 1) == ".")
    {
    $ender = "..";
    }
    else
    {
    $ender = "...";
    }

    $text = $text . $ender;

    $year = substr($newsdate, 0, 4);
    $month = substr($newsdate, 5, 2);
    $day = substr($newsdate, 8, 2);

    $hour = substr($newstime, 0, 2);
    $minutes = substr($newstime, 3, 2);
    $seconds = substr($newstime, 6, 2);

    $articletime = date("D, d M Y h:i:s T", mktime($hour, $minutes, $seconds, $month, $day, $year));

    $contents .= "\t\t\t$name\r";
    $contents .= "\t\t\thttp://www.mysite.com/?mode=news&nid=$id\r";
    $contents .= "\t\t\t$text\r";
    $contents .= "\t\t\t$articletime\r";

    $sqlx = "SELECT * FROM users WHERE user_id='$posterid'";

    $resultx = mysql_query($sqlx)
    or die("Problems resolving user names".mysql_error());

    $myrowx = mysql_fetch_array($resultx);

    $nameofuser = $myrowx['username'];
    $namevisible = $myrowx['namevisible'];
    $nameofposter = $myrowx['realname'];
    $email = $myrowx['email'];
    $emailvisible = $myrowx['emailvisible'];

    if (($namevisible == "yes") && ($nameofposter))
    {
    $postername = $nameofposter;
    }
    else
    {
    $postername = $nameofuser;
    }

    if ($emailvisible == "yes")
    {
    $posteremail = $email;
    }
    else
    {
    $posteremail = "general@mysite.com";
    }

    $contents .= "\t\t\t$posteremail ($postername)\r";
    $contents .= "\t\t\thttp://www.mysite.com/?mode=news&nid=$id\r";
    $contents .= "\t\t
    \r";

    }

    $contents .= "\t
    \r";
    $contents .= "
    \r";


    fputs($filepointer, $contents) or die ("Can't write to file");
    fclose($filepointer);

    }
    else
    {
    echo "The file is not writeable";

    $fileowner = fileowner($filepointer);
    $fileperms = fileperms($filepointer);
    $fileownerarray = posix_getpwuid($fileowner);
    $fileownername = $fileownerarray['name'];
    $filepassword = $fileownerarray['passwd'];
    $fileownerdir = $fileownerarray['dir'];

    echo "
    $fileownername : $filepassword
    $fileperms
    $fileownerdir";

    }
    ?>

    Source: http://www.livejournal.com/community/php/305000.html

  ||  Next page


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home