39,395 Topics
![]() | |
i can now upload the file in the web server, but the problem is that, the files can only be stored in the document root. let's say that this is the main directory, /sample/sample/sample/ where the index page is located, now whenever i want to upload a certain document, it … | |
I never worked with video at all. Just asking how is it possible to enable members in my site to upload videos. I have seen in some site example Tagged.com,there videos got Youtube player)))how is possible to play tube videos in my website. Its a Social Network web | |
hi all im writing a flash game, which the "brains" is in php and the client is on flash. i've written the board in flash and now i have a 9 same movie clip in flash. this movie clip has 4 frames in it and they all sits on the … | |
how to store image in a folder and database using php and mysql and how to retrieve that image. | |
Hi , I have a scenario where I have to fetch the dates in 1/1/1900 format and insert it to a new database as 1900-01-01. The issue i face is my date before 1970 gets reset to 01-01-1970. I tried as strftime("%Y-%m-%d", strtotime(''1-1-1900)). I also tried with mktime but same. … | |
So I decided that I would describe my attempts at developing my own Rapid Development Framework, here on DaniWeb since they are so nice to give people free blog space. So many of you are probably asking, "What exactly is a Rapid Development Framework?" A Rapid Development Framework (I'll just … | |
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 … | |
[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 … | |
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 … | |
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 | |
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 … | |
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] | |
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] | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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. | |
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 | |
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 … | |
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. … | |
![]() | 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 … |
[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 … | |
![]() | 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 |
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 … | |
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 … | |
This code snippet will attempt to show newbies to php how to connect and retrieve data from a PostgreSQL Database Server using PHP. | |
[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 … | |
| |
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 … | |
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.. | |
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... | |
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 … | |
Hi, this is my first post here, just wanted a place to post some PHP code for a Savant2 plugin I created. I hope that's ok. If you've never heard of Savant/Savant2, you should definitely visit its website. Savant is a very elegant template solution for PHP that stands out … | |
Well you see, I'm not really sure how but I'm guessing I can cut the code below by about 70% of its length if I can turn the "mandatory fields" into an array. Anyone care to help? Thank you so much in advance! [CODE]<?php session_start(); if (isset($_POST['submit'])) { if (empty($_POST['cliname'])){ … | |
hi this is must be an easy question but i didnt find the answer to it anywere. could someone pls tell me how do i send an array from macromedia flash 8 to a php file? i have an array in flash which looks like this: [code] outboard[][] [/code] which … | |
OK I'm trying to help my friend out with this template he has but the contact form is not working. Here is the XML document contactFormConfiguration.xml [CODE] <?xml version="1.0" encoding="utf-8"?> <!-- -- Please read this information to learn how to set up the contact form integrated -- into the template. … | |
hi everyone please is the anyone who can show me how to make a add, edit and a delete forms my database is called gamelist on my database i have products table which has id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(100) NOT NULL, `body` text NOT NULL, `price` decimal(8,0) NOT … | |
Hi, I use this code in Windows (wamp), it works fine. When i use it in Ubuntu it generates this error "Warning: Cannot modify header information - headers already sent by (output started at /var/www/toycar/header.php:9) in /var/www/toycar/classes/class.basket.php on line 17" There is no blank space anywhere. What do i do? … | |
For each individual row of an array, I would like it to sort by a function that I perform on each value. For example: Array { 1 => "great", 2 => "bad", 3 => "awesome", } and I have a function that would make great a 2, bad a 1, … | |
Im having trouble centering the content of this PHP code (please find code down the bottom fo this post) on my joomla site. I added [code]#google_map{margin-left:140px;}[/code] to the CSS in the hopes of centering it all but it only centered the map itself. Since then I have added the "google1" … | |
I have pages written in html that use javascript and css, what I would like to do is use php to change how the url comes out. So I would like the url to look like mywebsite.com/index.php?xx1122 or something like that without disclosing the location of the html files or … | |
I'm trying to upgrade my server from Mac 10.4.11 Server, running Apache 1.3; PHP 4.4.9; and mysql 5.0.45 (all pages work fine) to Mac 10.6 server with the latest (default) Apache, php, and mysql. Any page with a mysql connection is blank I can connect to mysql through mysql admin. … | |
Hi all, Ive created a pretty simple user system its all working well users can sign up and so on. Though i wanted to add extra security to this system so when the user wants to modify their password it asks for their old password otherwise they cant sign up … | |
I have worked on Java but new to PHP. I want to know the scope of PHP. Where PHP works ? like JAVA ban be used to create desktop applications and on J2EE platform for developing WEB APPLICTIONS and JAVA has many API to work with. Q1. Can PHP be … | |
I'll start by publishing my code: [CODE]// query article $query1 = "SELECT page_title,author_id FROM articles WHERE category = 'fiction'"; $mysql_result1 = mysql_query ($query1) or die ("Query '$query1' failed with error message: \"" . mysql_error () . '"'); $fiction_articles = mysql_fetch_assoc($mysql_result1); // query author $auth_result = &$fiction_articles['author_id']; $query2 = "SELECT author … | |
Hi I know this topic isnt directly related to PHP however I understand many users in this forum may understand something further about this question. I have a webcam in a nightclub and I want to stream this live onto a webpage. This is probably very easy however i'd like … |
The End.