Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
77% Quality Score
Upvotes Received
17
Posts with Upvotes
13
Upvoting Members
12
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
4
4 Commented Posts
~101.51K People Reached

244 Posted Topics

Member Avatar for The Mad Hatter
Member Avatar for bvowens

Open Notepad/Wordpad and navigate to <Your Windows Drive (C:/)>/windows/system32/drivers/etc/hosts (You might need to change Text Document (*.txt) to all files to see it) It should look something like this: [CODE]# Copyright (c) 1993-1999 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # …

Member Avatar for samy.youssef.12
0
879
Member Avatar for ErlendHL

Javascript itself cannot write on the server however AJAX would be a good way to do this, the AJAX tutorials at Tizag.com, they are very good. As for doing it through AS, you would need to create a javascript function and call it from within AS

Member Avatar for Donald_2
0
20K
Member Avatar for sk8ndestroy14
Member Avatar for ronaldpaul

Seperate them like normal functions e.g. [CODE]<input onblur="function1(); function2(); function3();" />[/CODE] You can also use standard JS like [CODE]<input onblur="this.value = 'somevalue' />[/CODE]

Member Avatar for gökhan_1
0
7K
Member Avatar for The Dude

Probz already been posted but hey Do you believe in Cod? Christians believe if they do not sin they will have salivation. We must try to control our animal orgies. What means “you should never stone the first cast”? Which religion do you use? Our church has smaller members every …

Member Avatar for Ene Uran
9
4K
Member Avatar for nil_gh_80

Why not just use FLV? its a lot simpler and will work in Firefox/Safari as well as IE P.S. I know you can run WMP plugin in firefox but its an extra download you don't need (Not sure about Safari thoug)

Member Avatar for amit.singh9
0
1K
Member Avatar for DealthRune

You meen something like the PM system here at Daniweb? I'm sure there will be loads of systems out there prebuilt for you

Member Avatar for lexayo
0
4K
Member Avatar for quecoder

Have a look at [url]http://www.hscripts.com/scripts/php/usersOnline.php[/url] and play about with that code. Regards, Sam Rudge

Member Avatar for diafol
0
132
Member Avatar for samarudge

Hey, I'm trying to implement CSRF tokens on a site of mine, but all the existing solutions have one of two problems; 1) The site runs on multiple servers (4 to be precise) so we can't use anything in _SESSION 2) The site gets over 400k hits a day on …

Member Avatar for jkon
0
778
Member Avatar for drewpark88

Not used it much, but GA has a 'Data Export' API [url]http://code.google.com/apis/analytics/docs/gdata/home.html[/url] and there's an (unofficial) PHP SDK [url]http://code.google.com/p/gapi-google-analytics-php-interface/[/url]

Member Avatar for pavankumarr
0
258
Member Avatar for AdriftUniform

PHP has a function called 'imagecreatefromstring()'; It will let you create an image from a string regardless of the type so you don't have to keep checking for the file types. Try something like [CODE] $src_image = imagecreatefromstring(file_get_contents($name)); [/CODE] You can even do error reporting [CODE] $src_image = imagecreatefromstring(file_get_contents($name)) if …

Member Avatar for AdriftUniform
0
411
Member Avatar for joshvanslam

This is normally done using MySQL or MongoDB to save the data and PHP to display it. You can use flat files but then you loose a lot of the power you can get from databases like MySQL or MongoDB A simple, flat-file example would be [CODE] <?php //Output whatever …

Member Avatar for diafol
0
153
Member Avatar for feoperro

There is no way to alter the way a browser renders a page. You can however use a tool like Firebug and try to find out why the images aren't loading. If the images aren't loading it's likely that there is something wrong. Firebug will let you see the HTTP …

Member Avatar for samarudge
0
129
Member Avatar for samcreator

Payment Gateways are, by definition, complex. Every payment gateway will be complicated and rely on frameworks. Some even require special modules to be loaded into PHP/Apache. In my experiance, PayPal Direct Payment is the easyest as it only uses a simple PHP framework and has lots of examples in their …

Member Avatar for samarudge
0
112
Member Avatar for Sanit

[code=php] <?php if(session_is_registered("sesvar")){ echo ("<a href='../../admin/comment-delete.php?id=$id2' onclick='return confirm('Are you SURE you want to delete this comment??')';><img src='../../images/delete.png' align='left' alt='Delete This Comment?'></a>"); } ?> [/code] try that

Member Avatar for leo_gatmaytan
0
2K
Member Avatar for network18

Several ways to run a PHP script outside browser: CLI (Command Line Interface) Call your script like [icode]#php /path/to/your/script.php[/icode] from terminal/CMD Telnet/SSH (Same as above) Crond On *NIX systems there is something called CROND which allows you to execute scripts according to a schedule E.G. every hour, every day, the …

Member Avatar for jan.cajthaml
0
3K
Member Avatar for samarudge

So I just got a new centOS box with PHP 5.1.something but I wanted it on PHP 5.2, initialy running [ICODE]yum update php[/ICODE] returned [CODE]php-pecl-memcache-2.2.6-1.el5.x86_64 from installed has depsolving problems --> Missing Dependency: php-zend-abi = 20050922 is needed by package php-pecl-memcache-2.2.6-1.el5.x86_64 (installed) Error: Missing Dependency: php-zend-abi = 20050922 is needed …

Member Avatar for Chanpan
0
246
Member Avatar for Arsench

Try adding the line [CODE] ini_set('display_errors', 1);[/CODE] (This turns on error reporting) and see what errors you get back

Member Avatar for Randy Orton
0
105
Member Avatar for xuexue

Have you tried using jQueryUI? It already has the functionality you need [url]http://jqueryui.com/demos/autocomplete/#remote[/url] But the problem could be that you define a function with two input variables but only pass one to it when you run it Maybe change [code=html] <input style="width: 200px;" id="name" onKeyUp="getInfo(this.value)" type="text" /> <div id="autoSuggestionsList"></div> [/code] …

Member Avatar for xuexue
0
222
Member Avatar for dan1992
Member Avatar for dan1992
0
142
Member Avatar for mbarandao

[code] echo "formObj.servicedesc.value = '".str_replace("\n", "<br/>", toSafeString($inf["servicedesc"]))."';\n"; [/code] Might do the trick

Member Avatar for mbarandao
0
123
Member Avatar for samarudge

Hey, So I have a *NIX box (CentOS 5.5) which runs a number of background processes, I leave it on 24/7 with just a terminal up on the screen (I don't have Gnome, KDE or any similar graphical frontend, just a prompt). Is there any way to get my background …

Member Avatar for shibblez
0
166
Member Avatar for samarudge

Hey, So I have a function to generate a slug URL, all the generated URLs must match a .htaccess rewriterule allowing only alpha-numerics, hyphens and underscores. My question is; how do I remove ALL characters other than the allowed characters. For reference, my URL rewrite is [ICODE]([0-9a-zA-Z_-]+)[/ICODE] -Sam

Member Avatar for samarudge
0
136
Member Avatar for samarudge

So I guess you guys are getting pretty fed up of answering questions about mod_rewrite, but here's another one to add to the pile. So I'm working on a new version of a site that's currently running (Lets call it mysite.com). Any visitor to [url]http://mysite.com/[/url] will be visibly redirected to …

Member Avatar for samarudge
0
155
Member Avatar for samarudge

On the URL shortener at DFT.BA, when a user visits a link we need the reffer header to be sent to the website we're directing too (For analytics etc.) Currently the URL redirect code is [CODE]header("Location: {$Link['link_target']}"); header("Refer: http://dft.ba/"); header("Referer: http://dft.ba/"); //Fallback for older browsers echo "<html><body><a href=\"{$Link['link_target']}\">Click To Go</a></body></html>";[/CODE] …

0
82
Member Avatar for samarudge

Hey, So I made a regular expression to check for valid URLs In Javascript I'm using the code [code=javascript] var valid_url = /^(https?:\/\/)?((([a-z\d]([a-z\d-]*[a-z\d])*)\.)+[a-z]{2,}|((\d{1,3}\.){3}\d{1,3}))(\:\d+)?(\/[-a-z\d%_.~+]*)*(\?[;&a-z\d%_.~+=-]*)?(\#[-a-z!//\d_]*)?$/i; var valid_protocol = /^http\:\/\/|https\:\/\//i; if ( !valid_url.test(url) || url.length == 0 ) { $('#url_return').html('Invalid URL!'); return false; } if ( !valid_protocol.test(url) ) { $('#input_url').val('http://'+url); url = $('#input_url').val(); …

Member Avatar for pritaeas
0
173
Member Avatar for cwarn23
Member Avatar for efmesch
1
175
Member Avatar for samarudge

On a site I'm working on we need to allow a user to download a file [B]once only[/B]. The problem is, if the download fails they can try again. I only want it to be registered as a download if it completes successfully The code I'm using at the moment; …

Member Avatar for richieking
0
97
Member Avatar for samarudge

Hi, I'm developing a custom shopping cart application for a client, there are two shipping rates; an international one and a domestic (US) one. When the user is on Paypal and they enter there address I need the shipping to change depending on the country. I currently have the code …

0
95
Member Avatar for samarudge

I've set up a laptop running Fedora 13 as a kind-of mini home server. I've installed without a desktop environment so I just have the command line on the screen. I've made a little script that lets me monitor some little programs in the background. If I leave the laptop …

Member Avatar for samarudge
0
150
Member Avatar for samarudge

Hi, A site I'm developing loads new pages via AJAX, to allow people to share the links we use a hashtag to track the URL E.G. User is on example.com/page1.html User clicks on link to example.com/page2.html page2.html is loaded dynamically and the URL is set to example.com/page1.html#!/page2.html That all works …

0
192
Member Avatar for samarudge

Hi, I have a PHP script that generates an image based on a font and text string to display custom fonts on my site. Overall the code works fine but there are a few little bugs; The image is clearly not high enough to display the full font correctly, part …

Member Avatar for Nyight
0
305
Member Avatar for samarudge

Hey, On a site I'm developing there is a separate Javascript file loaded when users are logged in as admin, for the sake of this I'll call it admin.js. This file contains a function called adm_linkify(); which adds 'Edit This Content' links to certain elements. There is also a main …

Member Avatar for fatihpiristine
0
81
Member Avatar for ksyz_1

Are you on a Windows system? (Guessing by the EXE extension but I may be wrong) If so, you need to give Apache2 permision to 'Interact with the desktop' To do this go Start->Run->(Type 'services.msc')->(Locate the Apache2 service)->Right Click->Properties->Log On Make sure 'Local System Account' is selected then check 'Allow …

Member Avatar for ksyz_1
0
123
Member Avatar for samarudge

So I'm trying to get 3 DIVs to line up as columns horizontally. I've got it to work in some browsers but not all. It's supposed to look like [IMG]http://www.cake-spoon.com/wp-content/uploads/2010/08/Screen-shot-2010-08-25-at-11.46.10.png[/IMG] However in some browsers it looks like [IMG]http://www.cake-spoon.com/wp-content/uploads/2010/08/Screen-shot-2010-08-25-at-11.46.30.png[/IMG] The code I'm using (Stripped of all the crap) is [code=html] <div …

Member Avatar for hielo
0
125
Member Avatar for love_bug

There is no way to refresh a page as and when the data is updated (Unless you wanted to set up some sort of AJAX check) but the easiest way of doing this is placing this code: [code=php]<?php header('Refresh: 5'); ?>[/code] on the [B]first [/B]line of your script (This will …

Member Avatar for gelos
0
348
Member Avatar for samarudge

Hey, Is there a way to get Apache to interpret all files with MIME types that are not already defined to PHP? I've tried AddType application/x-httpd-php * Any other ideas? Tnx, Sam Rudge

Member Avatar for Atli
0
65
Member Avatar for rahul8590

Hey, You need to have a HTML form to 'POST' (Submit) the form and a PHP script to generate the file. The HTML side call this form.html or something [CODE=html]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Form Page</title> </head> <body> <form …

Member Avatar for rahul8590
0
905
Member Avatar for virtualmisc

[QUOTE=virtualmisc;1051730]Hello friends I want to resize a youtube video in my site. Is it possible? Please help. Thanks[/QUOTE] Well the basic HTML embed code looks something like [code]<object width="[COLOR="Green"]560[/COLOR]" height="[COLOR="Green"]340[/COLOR]"><param name="movie" value="http://www.youtube.com/v/[COLOR="Red"]VID-ID[/COLOR]"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/[COLOR="Red"]VID-ID[/COLOR]" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="[COLOR="Green"]560[/COLOR]" height="[COLOR="Green"]340[/COLOR]"></embed></object>[/code] Replace the VID-ID parameter with the ID of …

Member Avatar for dream party
0
112
Member Avatar for samarudge

Hey, I'm having an issue with custom fonts on my site. I copied the code from a Google Fontlibary CSS file [CODE=css]/* Custom fonts for the site */ @font-face { font-family: 'Reenie Beanie'; font-style: normal; font-weight: normal; src: local('Reenie Beanie'), url('http://themes.googleusercontent.com/font?kit=ljpKc6CdXusL1cnGUSamX_cCQibwlboQP4eCflnqtq0') format('truetype'); } /*Assign the custom font's to where there …

Member Avatar for samarudge
0
166
Member Avatar for DILO3D

You can do it with Javascript like [CODE]<a href="#" onClick="window.open('http://url1.com/', '_blank'); window.open('http://url2.com/', '_blank'); window.open('http://url3.com/', '_blank'); return false;">Link name</a>[/CODE] Etc.

Member Avatar for samarudge
0
68
Member Avatar for ashcares

Create a simple script such as [code=php] <?php echo $_SERVER['HTTP_USER_AGENT']; ?> [/code] And look at the response. Find something uneque to the IPhone E.G. Safari-Mobile etc. and add that to your script

Member Avatar for mrlynn
0
163
Member Avatar for samarudge

Hi, I want to get the user and group that APACHE is running in through PHP. Like APACHE normally has the user 'apache' and group 'apache' but it can sometimes be 'httpd' for both or it may have been changed by the server admin. How do I find out the …

Member Avatar for SikoSoft
0
191
Member Avatar for samarudge

Hey, So I'm writing an application in Adobe Air (AJAX) and I've come upon a little problem. I've created a function to set a minimum size for the window [CODE]var check_size = function() { if ( window.nativeWindow.width < 690 ) { window.nativeWindow.width = 690; } if ( window.nativeWindow.height < 400 …

Member Avatar for fxm
0
246
Member Avatar for samarudge

Hey, I need to install PHPIze (To install XCache) so I ran the command [CODE]yum install php-devel[/CODE] (PHPIze is within the php-devel package) And that gives me the output [CODE]Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * epel: ftp.uni-koeln.de * rpmforge: ftp-stud.fht-esslingen.de Setting up Install Process Resolving Dependencies …

Member Avatar for abhisek.sanyal
0
468
Member Avatar for samarudge

Hey guys, I'm a bit of a Java noob but could someone please explain digital signatures to me. I have an application and I build it using the command [CODE=shell]javac -classpath %CP% TunerApplet.java jar cvf TunerApplet.jar *.class jarsigner -keystore Tuner -storepass authentic -keypass authentic TunerApplet.jar Tuner[/CODE] As a guess it …

Member Avatar for jwenting
0
118
Member Avatar for samarudge

Hey, So I have a small Flash application that plays a sound when a new message is received in a chat-box. The flash player is on a page embeded with an iframe. [CODE=html]<iframe width="1" height="1" frameborder="0" name="alerter" src="/chatbox/flash/alert/sound.php" id="chat_alert"></iframe>[/CODE] In the parent window, a variable called new_message is used to …

Member Avatar for samarudge
0
111
Member Avatar for nats01282

If you want to create your own CMS you will be looking at MySQL with PHP. There are loads of tutorials on this however there are a few realy good, pre-made CMS systems that will do all the work for you. Check out Joomla, Wordpress & Thesis or Drupal

Member Avatar for samarudge
0
122
Member Avatar for riddleyw

If you look up strip_tags on the PHP website you can define a list of the allowable tags. For example the quick reply editor on Daniweb has bold (<b>, <strong>) italic (<i>) underline (<u>) paragraphs (<p>) spans (<span) and links (<a>) so you would set a function like [CODE] $Input …

Member Avatar for diafol
0
78

The End.