You're correct in the fact that you've added delimiters to the pattern, however
you also need to specify the "s" pattern modifier so that the search spans over
multiple lines.
This should do the trick:
preg_match('#(.*)#is', $content, $matches);
---
> Date: Sat, 25 Aug 2012 23:10:08 +0200
Hi Gurus,
I am new to php and drupal both .
I have created two domains in drupal. and two different roles.
Now i wanted to show different page for each role.can you anybody tell me
how to do it.
Or share with me if something is readily available.
Thanks,
S
We have a simple script which rotates and image to a random value, saves
it to a cache directory and displays it. For some reason when I move the
script from a Debian box over to the production CentOS machine, it no
longer caches any of the images. the rest works, but not the cache. If you
could lo
, Dev Job wrote:
> Our company is looking to hire a PHP Developer for a short term project.
> We're currently in the last couple weeks of the interview phase to narrow
> down our options. We are looking for a developer that is comfortable
> working with existing code as well as
Just to clarify, we are looking for a single developer, not a team please.
Thanks!
On Mon, Jun 14, 2010 at 12:46 PM, Dev Job wrote:
> Our company is looking to hire a PHP Developer for a short term project.
> We're currently in the last couple weeks of the interview phase to na
Our company is looking to hire a PHP Developer for a short term project.
We're currently in the last couple weeks of the interview phase to narrow
down our options. We are looking for a developer that is comfortable
working with existing code as well as creating new code. You must be
skilled in
From: nitin reddy
To: php-general@lists.php.net
Sent: Fri, November 20, 2009 8:56:39 AM
Subject: [PHP] securing php pages
Hi I am a new user of PHP..in my project i have put login forms and i am
able to login successful but the pages after the login can be accessed
directly by typing the address
l place.
>
> Thank you,
> Micah Gersten
> onShore Networks
> Internal Developer
> http://www.onshore.com
>
>
>
> blackwater dev wrote:
> > I have a project now where we would like to properly remove unwanted data
> > before it goes into the db such as ` and of cours
I have a project now where we would like to properly remove unwanted data
before it goes into the db such as ` and of course slashes. The problem is
I have tons of pages. Is there an easy way to add in a clean up routine on
the db side to clean it going in and coming out without having to touch e
st save the searhed url in a db field. next time you just
>> need call the iframe with the last or N search
>>
>> anyway if you still want to save all the searched page try using curl
>>
>> http://ar.php.net/manual/en/function.curl-exec.php
>>
>> saludos
I'm using the google api to allow people to search the web via my site. The
pages are simply iframed within my site. Is it possible for me to give them
a 'save' button and let them save the page they are viewing in it's current
state? I don't mean save to their computer but I would use php to sa
Quoting jeffry s <[EMAIL PROTECTED]>:
thanks Richard ..
sorry dev.. i don't know this subject is quite sensitive here :(
It's not so sensitive :) It's just one of those questions that pop''s
up a lot. And some of those discussions were pretty heated.
Quoting jeffry s <[EMAIL PROTECTED]>:
some friend of mine ague about this matter, this morning. they say, saving
image in
database is more professional. I am not really agree with that,since i am
just a novice programmer. i am asking
senior php programmer what you opinion about this?
which one
Thanks,
We are basically just looking to prototype something with about 50 users for
now so I'll check these out.
Thanks again!
On Feb 5, 2008 12:30 PM, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Mon, February 4, 2008 9:15 pm, blackwater dev wrote:
> > I know this isn
I know this isn't specific to php but I need to add some code to my php
pages to start sending out text messages. If anyone does this, how do you
do it? Do you simply use a free service like teleflip or do you use a paid
aggregator company?
Thanks!
Quoting Jochem Maas <[EMAIL PROTECTED]>:
hi guys,
I want to build php with firebirdDB (ibase) extension (for the purposes
of this exercise it could just as well be mysql) without installing firebird
on the local machine (i'm moving the DB to a seperate server) ...
I can't figure out how to do
}
$dataRow=NULL;
$colsToUpdate=NULL;
$colset=NULL;
$textData=NULL;
}
else{
//insert the row
$sql="insert into prelim_$table values (";
$sql.=trim($insert_data);
$sql.=");";
I have a text file that contains 200k rows. These rows are to be imported
into our database. The majority of them will already exists while a few are
new. Here are a few options I've tried:
I've had php cycle through the file row by row and if the row is there,
delete it and do a straight ins
I have a script that has to make a connection via sftp and read the contents
of a file. In the shell, I can simply type
sftp [EMAIL PROTECTED]
As I use the keys on the server so don't need a password. How can I make
this connection in php so I can get the data contents nightly? We installed
te
I'm working on a prototype now and was wondering if anyone new of a service
where I could pass in text and a number and the service would call the
number and read the text. I know I can do this with asterisk and it's php
api but don't have time to set up all the outgoing code/functionality. Does
Sorry, thanks for the info!
On Dec 11, 2007 3:26 PM, Jay Blanchard <[EMAIL PROTECTED]> wrote:
> [snip]
> Yes but will these handle sftp? I have a key on the other server so don't
> need a password.
> [/snip]
>
> http://us.php.net/manual/en/function.ftp-ssl-connect.php
>
> always reply to all so t
I have to write a script that will connect to a remove server using sftp and
pull in specific files for processing. Currently I can get to the server by
just using sftp [EMAIL PROTECTED] How can I open these files via php? Is the
only way to use fopen with the PECL sftp, ssh2 modules?
Thanks!
te:
>
> this doesnt look like a wsdl file to me
> http://mysite.com/authenticate.php?wsdl
>
> -nathan
>
> On 10/2/07, blackwater dev <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> >
> > I have this nusoap service:
> >
> > $server= new soap_serv
Hello,
I have this nusoap service:
$server= new soap_server();
$server->register('authenticate_user', array(), array());
// Initialize WSDL support
$server->configureWSDL('authenticate', 'urn:authenticate');
// Register the method to expose
$server->register('authenticate_user',
On Fri, 14 Sep 2007 10:10:09 +0200, Per Jessen <[EMAIL PROTECTED]> wrote:
> Per Jessen wrote:
>
>> To let a user script bring down the host environment is just not
>> acceptable. IMHO.
>
> Here's an example from this morning - I have a situation where all I
> need to do is add a single superfluou
I need to put together a car classifieds site and before I re-invent the
wheel was curious if anyone new of any good php driven OS packages
available. Does anyone have any recommendations?
Thanks!
I have to register a bunch of names and am trying to figure out why I would
pay $35 when I can just pay $9 at godaddy. Does godaddy own it and I lease
it from them???
Thanks!
Looks like I have an empty space somewhere...this code is called down in a
class and if I just cut this out and copy into it's own file and call that
file from the browser, it works fine. It is someone getting garbled down in
the class.
On 7/31/07, blackwater dev <[EMAIL PROTECTED
Hello,
I have an excel file that I am generating. If I copy over the generated
file and then open it in excel, it works fine, if I try to let the user
download it using the headers below, when I then open it excel complains
that it is an unrecognizable format and the info is garbled...any ideas??
On Thu, 12 Jul 2007 18:45:36 +1000, John Comerford <[EMAIL PROTECTED]> wrote:
> Hi Folks,
>
> Is there a better way of doing the following:
>
> $Rows[] = array();
> $currentRow = count($Rows) - 1;
> $Rows[$currentRow]['test'] = "this is a test";
>
> Specifically I am wonder if I can avoid having
We have short tags enabled as our templates work fine with them.
Thanks!
On 7/5/07, Larry Garfield <[EMAIL PROTECTED]> wrote:
If I understand what you're doing correctly, then it should work and I've
done
it many times. First thing you should do, though, is switch from short
tags
to proper ta
I have a template system that takes some data, scrubs it and then with a
load method includes the required template. I need to add a param so it
doesn't simply include but returns the contents of the template in a string
with all of the vars populated. I tried:
ob_start();
include my template
Forgive me if this is a bit off topic but I currenly have several sites
hosted with dreamhost, it's cheap and well prone to be slow. Does anyone
have experience with mediatemple? I would just be running php/mysql sites.
Thanks!
Actually, the error seems to be coming with inner objects call some of their
methods. For example the object as a datamember that is a reference to
another object. When I clone it, I can't seem to call methods on the data
member object.
Thanks!
On 5/11/07, blackwater dev <[EMAIL P
I have a method within an class that should make a copy of itself, do some
stuff on the copy and return it. The object contains data members that are
references to other objects. I basically want a brand new copy of the
object. The problem is, certain methods I call on the object throw this
err
This question is a two parter
a) anyone else noticing filetype() failing on ISO image files?
Warning: filetype(): Lstat failed for /var/lib/samba/some/file.iso
b) I have a script that during processing will eventually call
exec('/usr/bin/file -bi '.$file)
over 1000 times, I've added a co
I need to allow a user to upload a file. Once the file is up, I need to
then move it to another server and wsync it to our webclusters. What's the
best way to do this with php? I don't really want php issuing root
commands. I've considered storing the file in the db but really need it to
be sc
I'm working on a site where I need to allow someone to send me a text
message and let the code take their message and respond or post it in the
db. Can someone point me in the right direction on how this is done?
Thanks!
simple way would be to have php send the page to the client. Then,it
will
look for the response.
blackwater dev wrote:
> I currently have an html page that posts to a cgi function. I need to
> interject some php in the middle. So, the form will post to itself, the
> php
> page will cat
I currently have an html page that posts to a cgi function. I need to
interject some php in the middle. So, the form will post to itself, the php
page will catch the post, check on thing and then pass along to the cgi page
but the cgi page only handles posts. How can I still php in the middle a
If I use add slashes, it strips everything, I just want to replace all the
double quotes with slash double quote but this, of course, throws errors:
str_replace(""","\"",$code);
Thanks!
Is there an easy way in php to round to the nearest 500?
So if I have 600, I 500 and if I have 800 I want 1000?
Thanks!
A month or so ago I can across a php based open source community news
package. I can't seem to find it now...does anyone know of one?
Thanks!
Is there a php function I can call to pass in a number and get the values
returned?
For example, pass in 7 and get 1,2,4 ?
Thanks!
I need to create some webservices for our web app and am really torn as to
which route to go...SOAP, XML_RPC, etc.? I like the looks of REST but many
of our partners that will be using our services use cold fusion and I think
that has build in SOAP support.
Which protocol would you use?
Thanks!
Does anyone have recommendations for an open source php based,
'lightweight', scheduling app? I just want something clean that I can use
to schedule trainings within our company. I need to be able to put in
details for each training and then see a synopsis on a calender. Just a
basic scheduler
I've heard that there might be a php library or framework that allows you to
expose your code as a webservice with little to no extra code. I heard the
code could potentially also allow access via several different protocols.
Has anyone come across anything similar, or do I need to pick a specif
I have the following code but when I hit the page, I get the xml error of
method '' not defined in service. I don't have a wsdl or anything defined.
Is there more I need to do to get the SOAP service set up?
Thanks!
include("nusoap/nusoap.php");
$server=new soap_server();
$server->register('ge
Thanks for all the insights. It appears that it might have thought my email
was spam as I sent it from another server and it worked fine.
Thanks!
On 1/16/07, Jochem Maas <[EMAIL PROTECTED]> wrote:
also consider that there maybe a reverse lookup being done on the sending
MTA
that the sms gatew
Has anyone been able to successfully send a text message using php and the
mail function?
It works fine if I open up thunderbird and send a message to
[EMAIL PROTECTED] but if I use the mail function:
mail("[EMAIL PROTECTED]", "test", "test");
It doesn't work. I've tried several different appr
I have session.user_trans_id set to 1 in my php.ini file yet when I see
links, the PHPSESSID isn't automatically added. I have another site where
this is done by php but on another box it isn't. The broken box uses
4.3.11with the following ini settings. What am I missing?
Thanks!
session.auto
nevermind, I was doing something stupid.
On 12/12/06, blackwater dev <[EMAIL PROTECTED]> wrote:
Ok,
I have a class which inherits from a parent class. My first thought is
that the child class inherits all of the functions of the parent but that
doesn't seem to be the case, do I
Ok,
I have a class which inherits from a parent class. My first thought is that
the child class inherits all of the functions of the parent but that doesn't
seem to be the case, do I really have to put parent::somefunction() to call
each one? Why can't I just use $this->parentfunction(); within
I asked a similar question the other day but I have been having an issue
lately with my sessions and certain browsers. I then tried to set my
session.use_cookies var in php.ini to 0 yet if I log in and don't have
cookies turned on, the sessions still don't seem to work. Can I really use
sessions
I have code which logs someone in and then allows them to see certain info
if they are logged in. I have users who claim it works fin in some of their
browsers, firefox, safari, etc and some versions of IE but not all and I'm
stumped.
Here's the code:
//this is from the login routine
if ($this
Yep, I get called to undefined function so I need to somehow re-compile the
cli version? How do I give support to just the cli version? I'm going to
the docs now.
Thanks!
On 9/28/06, Travis Doherty <[EMAIL PROTECTED]> wrote:
blackwater dev wrote:
> Ok, dumb question but ho
ting)
This is the great way PHP-cli lets you know it hasn't got any MySQL
support :)
Enable that, and you're good to go. Mind you, PHP-cli has a separate
php.ini file.
Ivo
On Thu, 28 Sep 2006 08:26:13 -0400, blackwater dev wrote:
> Ok, I've set up a username and password usi
rror...or at least no error to the screen and I do have a check
right after to kick off the mysql error if there is no connection ID but
again, I am su'ing to root so I thought it would always have rights. Not
really sure what to do next.
Thanks!
On 9/27/06, Richard Lynch <[EMAIL PROTECT
I have some code that makes a connection to the db. When I run this code
from the command line, it stops at the db connection. If I call the script
from the browser, it works fine. I've changed the permissions and that
didn't work. The db connection is the basic, localhost, root, with no
passw
great, thanks. So if it's just text, eval won't do anything?
On 9/20/06, Christopher Weldon <[EMAIL PROTECTED]> wrote:
blackwater dev wrote:
> First, the example I have is not the real situation, just an example so
I
> don't want to get into why are you doing it li
First, the example I have is not the real situation, just an example so I
don't want to get into why are you doing it like that, etc. Just want to
see if it's possible.
Basically, I want to store stuff in a text field in a db like this "johns
name is ucfirst('john adams') ".
When I cycle throug
Does anyone have any recommendations on some good live chat support apps?
These are the ones where someone can go to your site, click a button and
open a chat window with a customer service person. I'm particularly
interested in ones where we handled the server and everything.
Thanks!
I have a php app that runs on php4. I am writing some unit tests now using
SimpleTest but some of the libraries that I have to pull in for testing are
failing. For example, my db library sets some params:
$dname="mydatabase";
$usr="me";
..etc
I then have some mysql functions that connect using
It doesn't matter if I just surf to the page and they do seem to get the
same phpsessionid..interestingly enough the first three cars are 'BAD'. Not
sure if the path is writable through.
On 8/9/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
blackwater dev wrote:
> Sorry
Sorry if you are getting this multiple times, email is acting a bit screwy.
Nope. still doesn't work. Sessions just aren't saved.
On 8/9/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
blackwater dev wrote:
> Hello,
>
> I have a site that was coded a while ago. I was
Hello,
I have a site that was coded a while ago. I was just told that the admin
side no longer works. I looked and the host recently put php 4.4.2 on the
site. I have tried a few things but nothing seems to work. The problem is
once you log in the admin page always kicks you back, doesn't see
Ok, doing that now and it's taking a while. I can do phpinfo but that tells
me the config line and where the ini files are, not necessarily where the
configure stuff is to recompile...correct?
On 8/7/06, Jochem Maas <[EMAIL PROTECTED]> wrote:
blackwater dev wrote:
> Ok,
&g
Ok,
I am using a hosted server and php is installed from the linux distro. I
usually have all the stuff in a php file somewhere so I can just go back
./configure, etc. I can't seem to find the configure for php on this box so
I can recompile but I know it is there as I can use php and see the v
Hello all,
When I try to send email from my server as html, my yahoo account and
several of my user's email accounts mark it as spam. I can send a normal
email via mail() just fine but when I try to to html, it's bad. I've played
with a few things but can't seem to figure it out. The html I am
I have a web server and an images server. My web server doesn't have
enought space for the images, hence the images server. I have to download
properties from a realty database hourly and the data goes in to a db on my
webserver while the image needs to be taken from a MSSQL db and written to
th
What do you all recommend for testing the gui side of your php
applications? I've played with badboy a bit but we all run linux here at
work and I was looking for something more robust and would live to find a
free/inexpensive tool. I've also tried SimpleTest for the ui side but it
seemed to be
If I have a file:
/code/folder1/test.php
and in that file, it has these includes:
include_once("../../file1.php");
include_once("../../file2.php");
include_once("../../file3.php");
I then have another file:
/code/test2.php
That file pulls in test.php.
include_once("folder1/test.php");
Why
Hello,
I have some code which uses mail() and a day or so ago, the server stopped
sending mail. The code is the same and I checked that sendmail is
running. I also checked maillog which showed the messaged as qued but they
never come through in email. How can I debug this and what might have
Is there a single php function that will tell me if any values in one array
are in another without looping through one of the arrays and doing in_array?
Thanks!
Here is what I use as the header:
$header="From:[EMAIL PROTECTED]: text/html";
Thanks!
On 5/31/06, Richard Lynch <[EMAIL PROTECTED]> wrote:
On Tue, May 30, 2006 12:45 pm, blackwater dev wrote:
> I have a site running on a linux box. If I use my mail server via an
&g
I have a site running on a linux box. If I use my mail server via an email
client, the email works fine but if I send email through the mail function,
clients mark it as spam. I see the line in php.ini for SMTP but that says
windows only. How do I tell php to use my mail server?
Thanks!
Hello all,
I have a small site which provides search functionalities. My search sites
are framed in my clients sites via iframe. I have a client who would like
to put the search form somewhere else on their site (it is currenly all on
my page within the iframe) and then call their search page t
I have a realty site where people want to be able to save properties but
don't want to enter a username/password, etc. My first thought is just to
save the info to a cookie but am not sure if this is the best way. If
cookies aren't allowed, they will loose this functionality. I had thought
abou
I finally got it working and Chris was correct. It appears that cron was
using the wrong php. Pumping the errors of even logging them wouldn't have
helped as I was tweaking the ini for the php I thought it was using. When I
explicitly tell it which one to use, it seems to work fine.
Thanks!
O
I have a script which runs fine from the command line but when I try to run
it via cron, it seems to fail when the db class is instatiated, here is some
code:
$yesterday = date("Y-m-d",mktime(0, 0, 0, date("m") , date("d")-1,
date("Y")));
$file=fopen("/usr/local/apache2/htdocs/core/logs/import.
Hello all,
I am trying to create a simply rule so that when someone goes to:
mysite.com/users/1
They are redirected to:
mysite.com/users/index.php?uid=1
But am a bit lost looking through all the docs. I know people do this all
the time so am looking for some help.
Thanks!
Hello all,
I am currently running freetds on a linux box that needs to move data from a
remote mssql db to the local mysql db. I wanted to use bcp but freetds
couldn't as the data I am moving contains a blob field. I am currently
using php to select all the rows from the mssql db, and then loopi
I have a chunk of html data that I want to output for each iteration through
a db result
while($result){
$list.=file_get_contents("my_template_file.php");
}
return $list;
The template file looks like this:
I basically want a good way to keep the template file out of t
Is there a way to intercept and add code at the beginning and end of every
http request - WITHOUT having to put an include at the top and bottom of
every page?
This is something we need to be app specific so don't really want to do it
globally like chanse the php.ini or something.
Thanks!
I am doing a select from a mssql db and will then pump it into a mysql db.
What is the easiest way to take the result array from the mssql db and dump
it to a file that I can just pull into MySQL short of writing out to the
file row by row.
Thanks.
I have a project where I need to connect to a remote SQL Server and move
data from their to my localy MySQL server. On the remote SQL Server, I only
have access to a few views but need to get their data and move it to my
local MySQL db. What is the best way to do this? I have freetds compiled
an
I am trying to recompile php 5 with freetds so am using this :
./configure '--with-apxs2=/usr/local/apache2/bin/apxs'
'--with-mysql=/root/mysql-standard-4.1.9-pc-linux-gnu-i686'
'--with-mssql=/usr/local/freetds'
Things seem ok so I do make and at the end of make I get this error:
/usr/bin/ld:ext
I am a linux newbie but just compiled freetds on my fedora box. I used the
basic options:
./configure
make
make install
make clean
According to the docs it should install to /usr/local/freetds
After all this I don't have a freetds folder in /local/. If I go into
/usr/local/bin, I do have a tsq
Hello,
I am trying to do a pre-search to let the users know how many rows
will be returned before they actually hit submit. I think this is
more of a js question but :
I have this js function:
function preSearch() {
//Put the form data into a variable
var min_price= document.get
hello
i have been trying to learn php.
what is the best approach to learning php for someone who has no
programming experience?
i am very familiar with html, xhtml, and css. i'm not an idiot when it
comes to using computers.
i have bought several books and have subscribed to a couple of the
I have a client who wants to add some searching capabilities to their
site. We want the searches to be cool so need to somehow provide a map
of the state broken down by counties and allow people to search for
items within that certain county. I wanted to do something cool with
Ajax and PHP but real
I am going to try to post this to Zend.com also, just am hoping I can
get a quicker response here. I have Zend Studio 4 on my mac and just
installed a few updates from apple...quicktime, itunes, safari. I
then rebooted and it asked to update my key chain like normal and now
when I try to open Stu
On 12/31/05, Richard Lynch <[EMAIL PROTECTED]> wrote:
> On Thu, December 29, 2005 9:17 am, dev lamp wrote:
> > Scenario 2:
> > the perl extension does not get loaded and the PHP script crashes.
>
> Define "crashes"...
>
> Does it literally crash the PHP/
above situation ?
thanks
Dev.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On 12/29/05, Jochem Maas <[EMAIL PROTECTED]> wrote:
> dev lamp wrote:
> > Hi
> >
> > I am unable to call perl code from PHP, since the extension does not
> > get loaded !
> >
> > Scenario 1:
> > use dl('perl.so'); in the php code an
sion_dir = "/usr/local/lib/php/extensions/no-debug-zts-20041030/"
extension=perl.so
sample test code is as follows -
--
Dev.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sion_dir = "/usr/local/lib/php/extensions/no-debug-zts-20041030/"
extension=perl.so
sample test code is as follows -
--
Dev.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I have a form where I am dynamically building a bunch of checkbox
inputs. Then when submitted, I need to update the db. Problem is, of
course, if the checkbox is unchecked then the $_POST doesn't have the
value in the array. How can I get the value from $_POST even though
it's unchecked?
For ex
Hello all,
I have some array code driving me nuts.
I am pulling from a db:
select id, vehicle, has_quotes from cars where active=1
I then loop through these and build an array that contains the id's and cars.
while($res){
$cars[$res[id]]=$res[vehicle];
//here is the problem, when has_quotes i
I am sure others have encountered this so I am just looking for ideas.
Say I have an ancestry application where the users can enter parents,
children, etc. The children have children, etc.
table people
id
parent_id
what is the best way to pull this from the db minimizing the number
1 - 100 of 183 matches
Mail list logo