1. First Time Post and Question

    Date: 10/12/06     Keywords: php

    Greets all, first time poster and n00b to PHP, so bear with me please.

    Here's my code:


    I would like the text displayed by the echo to be used in an if statement. How do I call in this text in the statement? Any help would be appreciated.

    Link to pxweather.class.php

    Source: http://community.livejournal.com/php/502321.html

  2. PHP is the most obscene programming language

    Date: 10/11/06     Keywords: php

    PHP has the highest usage of the word "fuck" per package.

    http://blog.predius.org/2006/10/05/fucks-per-source-package-and-license/

    I don't know how scientific that study is, but it is amusing to see PHP at the top of the list.

    Source: http://community.livejournal.com/php/502062.html

  3. mysql_connect(...) - IP Vs. Socket

    Date: 10/11/06     Keywords: php, mysql, sql

    I haven't found much documentation on using a mysql socket 'localhost:/path/To/mysql.socket' versus just doing 'localhost' or 'myIP' when connecting to mysql using the php client library. Anyone know of any difference? I assume that sockets are more secure/faster because it doesn't have to go through the net stack just to communicate with a process that is on the same machine. But was curious if anyone knew.

    Source: http://community.livejournal.com/php/501894.html

  4. re-sort query results?

    Date: 10/10/06     Keywords: mysql, sql

    My brain is fried. I have a query that gets the last 5 items from a mysql table by ordering them in descending order and limiting them to 5 (ORDER BY ID DESC LIMIT = 5). But, I then need to display the results in ASC order.

    I am using some legacy code I am not entirely familiar with (the "$this->" operator), and I feel a little lost. Any ideas?

    Current code:
    $this->DBQuery("SELECT * FROM ".$this->table[3]." WHERE adate<='".$adate."' AND ".$sectionID." AND ".$priority." AND ".$authorID." AND status=1 ORDER BY ID DESC LIMIT ".$articlenumber);

    Source: http://community.livejournal.com/php/501510.html

  5. Displaying Errors

    Date: 10/09/06     Keywords: php

    Is there a function that will display errors even when phpinfo() shows display_errors is no/off?

    I've asked the guy configuring the server to turn it on a week ago and a couple times since. It makes developing slower having no specific feed back on errors.

    Source: http://community.livejournal.com/php/501478.html

  6. Calculating time elapsed

    Date: 10/09/06     Keywords: php

    Need to calculate the number of seconds (hours) that have elapsed.

    Start time: 2006-10-02 7:00:00

    End Time: 2006-10-03 13:00:00

    I know I have to convert the end points to something, and then find the difference. I just cant seem to find what I am looking for on PHP.net

    Any help is apreached.

    Source: http://community.livejournal.com/php/501038.html

  7. On-the-fly PDFs.

    Date: 10/06/06     Keywords: php, mysql, sql, web, google

    My employer wants to start generating PDFs from our PHP management system. I'm still pretty new to really 'doing things' with PHP and the PDF documentation I looked at on the online manual lacks clarification on almost every command for it.

    I'm wondering if someone has an idea of where I can read something of substance on the subject. My google results turned up a few web design tutorials - but they are based on depreciated code.

    Specifically I need to learn how to open a PDF file as a template only with added data from form/mysql information.

    Source: http://community.livejournal.com/php/500859.html

  8. Random Numbers and Cookies

    Date: 10/05/06     Keywords: no keywords

    I set a random number

    $randomc = rand(1, 10000);

    I set a cookie

    setcookie("tpf",$randomc);

    I echo back out the number and the cookie

    Echo ("random number c: $randomc
    ");
    echo $_COOKIE["tpf"];

     
    What I get

    The random number and cookie are different.
    If I refresh the screen, I get a new random number (as expected) but the cookie becomes the last random number set.

    I’ve looked at documentation for rand and mt_rand----I’m scratching my head.
    I'm sure it's something basic...

    Suggestions?

    Source: http://community.livejournal.com/php/500424.html

  9. Send mail error

    Date: 10/04/06     Keywords: google

    Can any one tell me what this error means

    "UNEXPECTED_DATA_AFTER_ADDRESS@.SYNTAX-ERROR.: "

    It appears in the email that is received. Sort of. One guy out of about 40 people sees this error. I cant reproduce the error on my systems so its a shot in the dark. I searched Google for the error, but none of the sites listed an explaination what it means or what the solution is. The error appears at the top of the email's content.

    *
    Oh, and even though the email is received and the content is there, this guy is freaking out...

    Source: http://community.livejournal.com/php/500136.html

  10. Security question for secret admin site.

    Date: 10/04/06     Keywords: security

    I am working on creating a site for an administrator to create/modify/delete users, apply memberships, and a variety of other tasks.

    It’s for a single administrator to use.  They will need rights to do it all.

    • The Location of the interface and all the accompanying scripts are behind “.htaccess”
    • There is no linking or mention of this admin site anywhere.
    What type(s) of security should I invoke?
    The scripts are already password protected behind .htaccess  --- do I need to do more?

    Source: http://community.livejournal.com/php/499848.html

  11. Downloading files

    Date: 10/02/06     Keywords: php

    For the sake of postertiy, and as seen on Digg, here is a way to download files with php. Tweak it a little, and you'd be able to hide the loaction and name of files so that people would be required to access it with your script. You'd also be able to control access. Neat!

    http://trailfire.com/bonlebon/marks/14947

    Source: http://community.livejournal.com/php/499197.html

  12. Generating MHT's

    Date: 09/29/06     Keywords: php, web, microsoft

    I need to read a webpage, and export it in .mht format (the microsoft, single file, web archive format) so I can email it away.

    I've searched the php functions list for 'mht' but come up with nothing.

    Any ideas? Thanks!

    Source: http://community.livejournal.com/php/498560.html

  13. Shoutcast

    Date: 09/29/06     Keywords: php, security, web, apache

    I'm running a Shoutcast server and attempting to enqueue MP3's to Winamp through a web interface. Is there any reason I can't do this command in PHP?

    	exec('winamp /ADD "'.$row[0].'"'));
    


    It's a Windows XP Pro box running Apache and PHP5. Winamp is in the system path, and $row[0] equals something like
    D:\Music\Music\Ace of Base\Ace of Base - Beautiful Life.mp3.
    I'm hesistant to use exec or system commands at all because of obvious security flaws, which leads me to wonder if PHP disables functionality through exec by default? I can't think of any other feasible ways to do this without slamming the CPU on my crappy little dev server. Any suggestions?

    Source: http://community.livejournal.com/php/498344.html

  14. XML and ampersands

    Date: 09/29/06     Keywords: html, xml

    I have a short script that gets an XML file from isbndb.com and parses it for three simple tags, then passes the information back to a script in the URL.

    My problem occurs when there's an ampersand within the data of the XML file. I only get the text that comes after the ampersand. I've tried urlencode, htmlspecialchars, and htmlentities when the data is saved to the variables, but I'm obviously going in the wrong direction. Anybody have any tips?

    Source: http://community.livejournal.com/php/498065.html

  15. Email List that Checks Email?

    Date: 09/28/06     Keywords: php

    Hello,

    I'm working with a product that is getting lots of inquires about our New York distribution. When an email comes in, if the subject or body contains the words NY, or New York I'd like to have the email address collected in a file seperated by ","'s and the email to continue on to the sales person. At the end of the week we could then put a newsletter together using these addresses and send it out. Is there a php script that does this or does anyone know of anything that does this? I don't have the ability to install procmail on the server but I can setup forwards, aliases, pop, and imap.

    Thanks,
    Doug

    Source: http://community.livejournal.com/php/497499.html

  16. require vs. include

    Date: 09/27/06     Keywords: php

    I know that php will die on missing files with require (and warn on missing files with include) -- what I don't know is if there is a performance difference between using the two?

    Source: http://community.livejournal.com/php/497177.html

  17. "PHP is doomed", says Techrepublic "expert"

    Date: 09/25/06     Keywords: php, programming

    Here is the article in question

    Basically, his argument is: PHP doesn't have multi-threading, and that means it's "doomed" as a programming language. Er, yeah...

    If anyone here wants to follow up on the entry in question, accounts on Tech Republic are free.

    Source: http://community.livejournal.com/php/497074.html

  18. single php file multiple directories?

    Date: 09/24/06     Keywords: php

    How can I do this?

    I have a directory foo. In this directory I'd like to put a single .php file that will be called when any subdirectory of foo is accessed. Like say:

    domain.com/foo/alice
    domain.com/foo/bob

    Then I want the php script to be able to pull out the (alice|bob) part of the URL. Is this possible?

    Source: http://community.livejournal.com/php/496735.html

  19. Contract position in DC

    Date: 09/22/06     Keywords: php, css, sql, java, postgresql

    A couple of weeks back, I posted about a possible job opening in the DC area -- well, that one has been filled already with someone already in the company. However, they are now posting a new 6-month contract position with about a 50% chance of becoming a permanent position at the end of the contract.

    The position is at The Atlantic Media Company, which produces (among others) The National Journal, Atlantic Monthly and Government Executive magazines. The position in question would assist in fleshing out a next generation content management system, and integrate it into the workflow of the various publications. DC area applicants are preferred, but remote work is not out of the question. I won't kid you that the pace of the work is frantic, but I know there are some who thrive on high expectations -- if that's your thing, by all means apply.

    Skills:
    PHP (5+, some OO preferred, Zend Framework a plus)
    PostgreSQL
    CSS
    Javascript (we'll be using the jQuery library)
    DB admin skills a big plus
    Red Hat skills a plus

    Send resumes and salary requirements to ssweet@nationaljournal.com

    Source: http://community.livejournal.com/php/496611.html

  20. PHP equivalent to jar

    Date: 09/21/06     Keywords: php, java

    The other week I talked to someone who lamented the fact that PHP doesn't have anything like Java's jar... where you can compress and run the application from this archive. I couldn't offer any suggestions, I was wondering if anyone had any idea's?

    Source: http://community.livejournal.com/php/496170.html

Previous page  ||  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