Free PHP Script for Ad Management , Affiliate Programs , Auctions , Blog , Bookmark Management , Calculators , Calendars , Chat Scripts , Classified Ads , Click Tracking , Communication Tools , Content Management , Contests and Awards , Countdowns , Counters , Customer Support , Database Tools , Date and Time , Development Tools , Discussion Boards , Documents , E-Commerce , Education , Email Systems , Error Handling , Exchanges , FAQ and Knowledgebase , File Manipulation , Financial Tools , Flash and PHP , Form Processors , Games and Entertainment , Graphs and Charts , Groupware Tools , Guestbooks , Healthcare , Image Galleries , Image Handling , Interactive Stories , Link Checking , Link Indexing , Mailing List Managers , Match Making , Miscellaneous , Multi-Level Marketing , Multimedia , Music Libraries , Networking Tools , News Publishing , Open Directory Project , Organizers , Polls and Voting , Portal Systems , Postcards , Quote Display , Randomizing , Real Estate , Redirection , Reviews and Ratings , Search Engines , Security Systems , Server Management , Site Mapping , Site Navigation , Site Recommendation , Software Repository , Tests and Quizzes , Text Processing , Top Sites , URL Submitters , Usenet Gateway , User Authentication , User Management , Vertical Markets , Virtual Communities , WAP and WML , Web Fetching , Web Hosting Tools , Web Rings , Web Search , Web Traffic Analysis , Wikis , WYSIWYG Editors , XML and PHP , Zip Code Locators,
Wednesday, April 22, 2009
Use preg_match OR preg_match_all to solve this problem.Here i have given simple Example for taking name and image format or extension and stored it in array:
Example1: Taking name and image format or extension from
<img src>
Here is the code:
$url=‘<img src="http://www.computereducationworld.com/logo.jpg">’;
preg_match_all(‘/ (src)(\=\’|\=\”)http:\/\/([a-zA-Z0-9\-\_\/\.]+|)\/([a-zA-Z0-9\-\_]+)\.([a-zA-Z]+)(\’|\”)/’,$url,$ImagesArray1,PREG_SET_ORDER);
print_r($ImagesArray1);
Output:
Array (
[0] => Array (
[0] => src="http://www.computereducationworld.com/logo.jpg"
[1] => src
[2] => ="
[3] [...]
preg_match_all function matches given parameters inside given string,number,url as in tag we can fetch value of src and stored it in an array
Example:
preg_match_all(‘/ (src)(\=\’|\=\”)([a-zA-Z0-9\-\_\.\/\:]+)\’|\”/’,"<img src=’http://www.computereducationworld.com/logo.jpg’>",$ImagesArray,PREG_SET_ORDER);
print_r($ImagesArray);
Output:
Array ( [0] =>
Array (
[0] => src=‘http://www.computereducationworld.com/logo.jpg’
[1] => src
[2] => =‘
[3] => http://www.computereducationworld.com/logo.jpg
)
)
Also filed in
|
|
How to Clear Cache in php using header();
header(‘Expires: Mon, 26 Jul 1997 05:00:00 GMT’);
header(‘Last-Modified: ‘ . gmdate(‘D, d M Y H:i:s’) . ‘ GMT’);
header(‘Cache-Control: no-store, no-cache, must-revalidate’);
header(‘Cache-Control: post-check=0, pre-check=0′, false);
header(‘Pragma: no-cache’);
Also filed in
|
|
While using tinyMCE in textarea via javascript don’t use->
document.getElementById(‘txtMessage’).value;
use:
<strong>tinyMCE.get(‘txtMessage’).getContent();</strong>
example:
<script type="text/javascript">tinyMCE.init({
…});
</script>
<textarea id="txtMessage" name="txtMessage" rows="25" cols="100"></textarea>
<input type="button" id="message" name="message" value="Sent" onclick="alert(tinyMCE.get(’txtMessage’).getContent());" />
Thursday, February 5, 2009
pxWeather gives you easy access to National Weather Service forecasts and current conditions for integration into your PHP application. To improve performance and decrease load on the data source, pxWeather can cache weather data locally.
Requirement
PHP 4.1.0 or later, installed with cURL support
Download pxweather
pxweather_1.0.zip(7 downloads)
pxweather_1.0.tar.gz(5 downloads)
Thursday, February 5, 2009
XMLTV is a suite of grabbers and tools to retrieve tv listings from one of the major television magazine websites (e.x. TV-Today) and to store it as XML data. The XML structure is independent of the source data. There also is a simple example script which shows how to use the classes and displays a [...]
Thursday, February 5, 2009
Molins is a framework for PHP 5 that was inspired by Struts, but also has much in common with the other sub-projects of Jakarta like Torque and Commons. It features very good integration with Smarty, can work with XSLT, and supports
logging, unit testing, and class packaging similar to Java.
free Download
Molins framework php5(9 downloads)
[...]
Wednesday, January 28, 2009
This is a good PHP class for controlling How many times Ad display in 24 hours. This is very useful for preventing Spamming bots from rack up massive amount of views on programs like adsense
Free download PHP Class for limiting Adsense and Ads Display
PHP Class for limiting Adsense and Ads Display(15 downloads)
[...]
Wednesday, January 28, 2009
This PHP script helps in scans a domain for all its internal links, ignores its external links and invalid links and automatically creates a valid Google sitemap ready to use for your webmaster tools.
Free Download PHP class For Google sitemaps
Creating Google sitemaps(13 downloads)
Wednesday, January 28, 2009
Free PHP RSS to Content Reuters the HTML it retrives from multiple RSS feeds. It accepts up to 5 feeds you give it, combines the feeds together, shuffles and inserts your preset number of listings from the feeds into your HTML for spiders to crawl. You can use Yahoo news feeds or any other newsfeed [...]
Free PHP Captcha script by ComputereducationWorld.com & WebWalas.com
Download Here : Free PHP Captcha Script
How to use:
Download the code
Put everything under one directory
Open index.php find code “<img src=”<?$DOCUMENT_ROOT?>/installdirectory/captcha.php” mce_src=”<?$DOCUMENT_ROOT?>/installdirectory/captcha.php” style=”border-color:#000000″ border=”1″>” replace the directory name “installdirectory” with your directory name.
Open captcha.php file and find: “$fonts[$DOCUMENT_ROOT."/installdirectory/ariblk.ttf"]["min"] = 35; //For Your Linux server
$fonts[$DOCUMENT_ROOT."/installdirectory/ariblk.ttf"]["max"] = 50; //For Your Linux server” and [...]
Script to check the size of your webpage/image
<?
function check_url_size($url){
$head = "";
$url_p = parse_url($url);
$host = $url_p["host"];
$path = $url_p["path"];
$fp = @fsockopen($host, 80, $errno, $errstr, 20);
if(!$fp)
{ return false; }
else
{
[...]