- Strength to Increase Rep
- +7
- Strength to Decrease Rep
- -1
- Upvotes Received
- 17
- Posts with Upvotes
- 13
- Upvoting Members
- 12
- Downvotes Received
- 4
- Posts with Downvotes
- 4
- Downvoting Members
- 4
244 Posted Topics
Re: I think my views are summarized in my sig-block =P | |
Re: 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. # … | |
Re: 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 | |
Re: 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] | |
Re: 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 … | |
Re: 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) | |
Re: You meen something like the PM system here at Daniweb? I'm sure there will be loads of systems out there prebuilt for you | |
Re: Have a look at [url]http://www.hscripts.com/scripts/php/usersOnline.php[/url] and play about with that code. Regards, Sam Rudge ![]() | |
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 … | |
Re: 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] | |
Re: 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 … | |
Re: 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 … ![]() | |
![]() | Re: 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 … |
Re: 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 … | |
Re: [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 | |
Re: 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 … | |
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 … | |
Re: Try adding the line [CODE] ini_set('display_errors', 1);[/CODE] (This turns on error reporting) and see what errors you get back | |
Re: 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] … | |
| |
Re: [code] echo "formObj.servicedesc.value = '".str_replace("\n", "<br/>", toSafeString($inf["servicedesc"]))."';\n"; [/code] Might do the trick | |
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 … | |
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 | |
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 … | |
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] … | |
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(); … | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
Re: 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 … | |
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 … | |
Re: 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 … | |
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 | |
Re: 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 … | |
Re: [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 … | |
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 … | |
Re: 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. | |
Re: 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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
Re: 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 | |
Re: 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 … ![]() |
The End.