39,316 Topics

Member Avatar for
Member Avatar for EddieC

Yahoo Inc., the apple of Microsoft’s eye in recent weeks, has unveiled improvements to the [URL=http://developer.yahoo.com/] Yahoo Development Network[/URL], Web-service capabilities and advertiser opportunities. The moves could be seen as an attempt to show Yahoo’s value is greater than the US$40 billion acquisition bid of the Redmond giant. Most recent …

0
172
Member Avatar for newsguy

[URL="http://www.gentoo.org"]Gentoo[/URL] has issued a security advisory with a high impact rating affecting users of PHP <5.2.2. Several vulnerabilities have been found in PHP, not least a huge number discovered by Stefan Esser during the infamous Month Of PHP Bugs (MOPB) including integer overflows in wbmp.c from the GD library and …

Member Avatar for newsguy
0
474
Member Avatar for happygeek

IT security specialist [URL="http://www.sophos.com"]Sophos[/URL] is warning anyone with a website about recently uncovered evidence that spammers are hacking into legitimate sites in order to sell drugs. Online pharmacy spam, be it under the Viagra or just general prescription drug banner, has become one of the most annoying and persistent forms …

Member Avatar for XXPepper
0
830
Member Avatar for Menster

Hi there peoples, This is a currency converter, built with a combination of javascript and php, which uses an XML feed from [url]http://www.ecb.int/[/url] to get up to date exchange rates. I know the xml handling is not very elegant, but it is functional :) Additions/comments/corrections welcome

0
269
Member Avatar for itsjareds

I answered a question a few days ago on Yahoo! Answers where I helped (did all the work for) the question asker. They were asking for a way to parse text from a <textarea> and search for HTML-like elements that were named in a database (or an array, in my …

Member Avatar for itsjareds
0
149
Member Avatar for digital-ether

This class allows you to use the Google AJAX Translation API to translate arbitrary text to the many languages supported by the Google API. Source versioning added to: [url]http://code.google.com/p/php-language-api/[/url]

0
1K
Member Avatar for ShawnCplus

So you've got this big long function chain and PHP's oh-so-helpful [B]Fatal Error[/B] messages aren't helping at all. Here's a quick example of how to do a function backtrace without throwing exceptions. [B]Output[/B]: [code] =>[0] => Array ( [file] => someFile.php [line] => 4 ) => Hello World [/code]

0
77
Member Avatar for ShawnCplus

This is a recursive function I made to draw purely CSS bar graphs. You pass it an array of data and the total amount, example: [code=php]$someData = array('Oranges'=>4, 'Apples'=>10); $total = 14; echo drawCSSGraph($someData, $total);[/code] Also, you can pass it options in the form of an array or as space …

Member Avatar for ShawnCplus
-1
142
Member Avatar for digital-ether

Just copy and paste the snippet into a file and save. You need to save this under the web root, not in a web accessible folder. For example, on linux you could save it in your home directory. Say your user is "joe" then save it in /home/joe/ . Ify …

0
269
Member Avatar for maddog39

This class will allow you to take an RSS feed (local or remote) and "export" it to an easily managed/viewed array. Below is an example of it usage: [code=php] <?php include("exportrss.php"); // Parse XML/RSS 2.0 feed $feed = new ExportRSS("test.xml", "2.0"); $channel = $feed->get_channel_data(); echo "<h3>Channel</h3> <p> <b>Title:</b> {$channel['title']}<br/> <b>Date:</b> …

0
277
Member Avatar for Shaffer

Hello, this code snippet is a function used to manage an unlimited amount of hit counters with a text file. [B]It is crucial that each page will only be displayed once.[/B] The text file syntax: [code] page_name.php:0 page_name.php:0 [/code] An example of a text file that was just set-up (not …

0
82
Member Avatar for Shaffer

This function distributes mail to a mailing list, out of an array. Wether the array is plundered from a database, a file, or from the code, the function only takes a prepared one. Also, this function is only good for HTML messages. The array's syntax is to be: [code] array("recipent's …

Member Avatar for sonny.scroggin
0
141
Member Avatar for Shaffer

This function caps a specific letter of a string, and returns the updated string. THe first letter is 0, as it is default as well.

Member Avatar for Shaffer
0
146
Member Avatar for MitkOK

Here are two simple functions to validate name and e-mail . int [COLOR="#008000"]valName[/COLOR]( string $arg1 ) - this function returns 1 if name is correct, 0 if incorrect int [COLOR="Green"]valMail[/COLOR]( string $arg1 ) - this function returns 1 if name is correct, 0 if incorrect

0
184
Member Avatar for php4ever

While doing a redesign of two sites I had this need to take my clients TemplateMonster template and show flash on ONLY the front page and a static image on the internal pages but the problem was that it ran on a template engine which used a single load header …

0
86
Member Avatar for php4ever

Okay so I had this need to vary the template layout of an osCommerce theme using its BTS (basic template system) and noticed that unlike standard osCommerce where you can edit each and every individual page to have a unique layout, BTS uses a template system to generate its look. …

0
122
Member Avatar for diafol

A simple example of date (day and month) translation. The code is for Welsh, but can be easily modified for any language - especially those without "full" support. I have used the code in a footer to display the last updated date and time. //EDIT - a few years later …

Member Avatar for 42south
0
250
Member Avatar for Banderson

[COLOR=Blue] Ever since PHP turned register_globals_off I have had problems here and there in my codes. I searched hard and long for a simple fix while keeping globals turned off. Fortunately, I found one! I have posted it below for your convenience and it is also described [URL=http://www.nasatech.com/PHP-DOCS/faq.misc.html#faq.misc.registerglobals]Here[/URL]. I'm not …

Member Avatar for Banderson
0
427
Member Avatar for Electrohead

Example of using INCLUDE to show a nav bar. For beginners. Simply uses include to show an external file (in this case, nav.php) and that's it! You can also include this in another page with a CSS style. The CSS will be automatically included in formatting the INCLUDEd page! :D

Member Avatar for Dani
0
146
Member Avatar for Troy

class_http.php is a "screen-scraping" utility that makes it easy to scrape content and cache scraped content for any number of seconds desired before hitting the live source again. Caching makes you a good neighbor! The class has 2 static methods that make it easy to extract individual tables of data …

Member Avatar for Samir
0
330
Member Avatar for Troy

class_db.php is a database class that provides methods to work with mysql, postgres, and mssql databases. Other database types can be easily added. The class provides a common interface to the various database types. A powerful feature of the class is the ability to cache datasets to disk using a …

Member Avatar for ethen_th
0
210
Member Avatar for JRED

This code snippet will attempt to show newbies to php how to connect and retrieve data from a PostgreSQL Database Server using PHP.

Member Avatar for Troy
0
177
Member Avatar for corewizard
Member Avatar for Scribbller
Member Avatar for Gandalf

[b]1. mod_rewrite se friendly pages for vBulletin[/b] Here is a seo hack for vBulletin developed by Danielle Horowitz. You can find original text at [url="http://www.daniweb.com/techtalkforums/thread9379.html"]http://www.daniweb.com/techtalkforums/thread9379.html[/url] I have remade her instructions in the phpBB mod like format. You can read them here [url="http://www.daniweb.com/techtalkforums/post87148.html#post87148"]http://www.daniweb.com/techtalkforums/post87148.html#post87148[/url] You can download text file here [b]2. Meta …

Member Avatar for didier-fr
0
479
Member Avatar for Scribbller
Member Avatar for dap62
0
96
Member Avatar for ReDuX

Ok, this is about as simple as it gets. This is a hit counter for your page that stores the count in a simple text file of your choosing. No need for a database, MySQL or otherwise. No complicated rubbish. Just one single function and one single file to store …

Member Avatar for DaveSW
0
139
Member Avatar for ReDuX

Well like my previous snippet but completing the collection i suppose, this snippet counts how long it takes to parse the page and displays it somewhere..

Member Avatar for mohamed badr
0
164
Member Avatar for ReDuX

You've seen those sites that say how many seconds it took to parse the page and how many database queries comprised the page. Well heres the database query bit...

Member Avatar for klinke
0
195
Member Avatar for Syneticus

Alrighty! My goal here is to add the specified information into a MySQL database, but then also include a script that goes back and checks to make sure that the entrie given does not already exist. If you have any corrections, or any ideas on how to do this, I'd …

Member Avatar for Ginetta
0
100

The End.