I'm currently trying to learn regular expressions with some simple "real world" examples.
Take in consideration the following string:
Mozilla/5.0 (Windows; U; Windows NT
5.0; en-US; rv:1.9.2a1pre) Gecko
I want to find the RV value (1.9.2a1pre). I need to apply the following rules:
RV: can be in any case (RV, rv, rV, Rv...).
RV...
Hi!
I am retrieving an html document from a MySQL db through PHP, and it has semi-colons in the style tags like this
style="background-color:black;display:block"
I've had issues with the quotes, and escaped them with slashes however I can't do the same with a semi-colon. Is there any way to escape this?
Thanks for any help!
...
Is there an existing PHP/MySQL CMS that would be appropriate to manage multiple websites with one backend? The sites will most likely exist on multiple servers and will have different domains. I took a look at wordpress MU, however it doesn't appear to have features for sites on different domains or servers. A CMS that also has an API fo...
Hi,
as the title says: Anyone know about any good/simple multiple file upload script that uses php/mysql and ajax/javascript?
I want it to show a progress-bar, and easy customization.
I've tried uploadify and fancyupload, but I would want the option of adding a description and title. (and I've got some bad experience with uploaders usi...
Hello,
The function check_porn_terms below checks to see if a variable contains terms that are not family friendly, and it it does, then re-directs the user back to the main page.
As listed below, it checks to see if the variable $title has non-family friendly terms. I would like to perform this check on another variable, $cleanurl....
I am developing a site using kohana 2.3 and am having trouble with a specific ORM query. Essentially what I am doing is the following query
SELECT *
FROM 'records'
WHERE ('ServRepSupervisor' = name AND 'Followup_read' = 0) OR ('ServRepSupervisor' = name AND `read` = 0)
when I try the ORM query like this...
$unread = ORM::factor...
Hi,
I'm using a webservice that in my request includes a ¥ symbol (chr 0165). I have set the encoding on my soap client to:
$soap = new MySoapClient('address.wsdl',
array('trace' => 1, 'encoding'=>'ISO-8859-1'));
But when I look at my outgoing soap package the "¥" is changed to "Â¥"
I'm not good at encoding but I've tried a number...
Hi everybody!
I have 2 files on 2 different servers:
file1.php
- resides on site 1
- I pass a parameter, and the script echo-ed answer which depends on (is function of) passed parameter
- everithink is OK when I access file by browser like
http://site1.com/file1.php?parameterValue
file2.php
- resides on site 2
- file2 has to sen...
I was wondering what the easiest way to write a simple form program or web page that will output to a text file that can be opened in excel easily. I know how to write in C++ but I dont know any GUI and I wanted a simple form. I was thinking I could just write an HTML/PHP page but it has to be able to run without the internet, but I dont...
I am using an alias in my select clause ("AVG(u.rating) as avg_rating") and would then like to add this in my where clause "avg_rating > 3" but when I try and run this query I get a "Unknown column 'u3__1' in 'where clause'." Does anyone happen to know how I can get my where clause to see the alias? This alias works in the orderBy with ...
I'm going to be creating an internal app for the iPhone and iPad that will keep track of sales calls, the associated quotes, photos, and drawings for those quotes. I'm still in the concept design phase and I'm trying to read up on the different ways to communicate between my app and the webservice. Obviously since this will be used mostl...
how i can i complete oauth authentication with php for jaiku? i completed authentications for google, facebook,friendfeed, etc. but for jaiku there is a problem. can you send an example for jaiku oauth?
...
Hello,
The code below works well. It submits some variables into a MySQL database. How could I block the submission and redirect the user back to domain.com/index.php if the conditions below are met?
Conditions:
$uid has been used more 11 or more times in a calendar day.
$cleanurl has ever been used before.
Thanks in advance,
J...
Have a form that is emailed with checkboxes.
Some checkboxes have an optional field to enter text. Like "other and more info"
How can I attach the text people entered to those check boxes that this option.
This is one group.
<form action="sendemail.php" method="POST" name="Contact Form">
<div><input type="checkbox" class="checkb...
Hi,
What's an example of a simple handshake between a php socket
server and flash? A test I can run command line would be ideal,
since I don't have a server for this experiment.
I'm need a good example that's easy, and something I
can run off my laptop without internet:)
Thanks
FLASH CLIENT
//SOCKET CLIENT IN FLASH AS3
var xmlSoc=ne...
Getting some data from a MySQL database and loading it into the page. None of the stuff really needs to be retrieved at any point other than page load, so that advantage of Ajax is moot. Is there any other advantage to Ajax?
...
The ZF Docs reference 'Subclassing the Action Controller' (bottom of the page), but don't reference a standard place to put the new Action_Controller class.
Application_Module_Autoloader sets up pats for a bunch of things, but never controllers. I guess putting it on library/APPNAMESAPCE/Action/Contoller would work. But that seems a bi...
How do I run validation checks on a password field in CakePHP, seeing that the password is hashed before I get a chance to run any checks on it?
...
I just migrated a site to an updated version, but want to put 301 redirects in place for some of the most common entry pages of the site to their counterparts
So here's the rule I'm adding to the .htaccess:
Redirect 301 /oldhomepage.htm http://www.thesite.com/
It sort of works, but it redirects to
http://www.thesite.com/?url=oldho...
Suppose I have some PHP code running inside a web server, for example, running a simple CakePHP app. From this app, I want to occasionally make a TLS connection out to some server to exchange some data. How is this typically done? (I have little experience with PHP.)
What PHP plug-ins or libraries or whatever, are recommended to accompl...