Hi
How can i calculate year from entering my age using php.
example:
i am entering my age as 24.
So that i need to get the year as 1985.
how this can be done.
thanks in advance
I have some testcases/strings in this format:
o201_01_01a_Testing_to_see_If_this_testcases_passes:without_data
o201_01_01b_Testing_to_see_If_this_testcases_passes:data
rx01_01_03d_Testing_the_reconfiguration/Retest:
Actually this testcase name consists of the actual name and the description.
So, I want to split them like this :
o201_01_01a Testing_to_see_If_this_testcases_passes:without_data
o201_01_01b Testing_to_see_If_this_testcases_passes:data
rx01_01_03d Testing_the_reconfiguration/Retest:
I am unable to figure out the exact way to do this in explode in php
Can anyone help please?
Thanks.
I'm writing a parser in PHP which must be able to handle large in-memory strings, so this is a somewhat important issue. (ie, please don't "premature optimize" flame me, please)
How does the substr function work? Does it make a second copy of the string data in memory, or does it reference the original? Should I worry about calling, for example, $str = substr($str, 1); in a loop?
Hello! can anybody help me with a simple script wrote in php to upload an image to imageshack or similar? i found some scipts aroud but they dont work, so if you wrote one o found one please send it to me with a working html form. Thanks!!!!
I have two classes that work seperate from another, but they extend the same class. Is it possible to have them work the same instance of the extended class. I'm wanting the constructor of the extended class to run only once.
I know this isn't right but something like this:
<?php
$oApp = new app;
class a extends $oApp {}
class b extends $oApp {}
Hello,
I'm using Twitter Basic authentification in a CRON agent to get et savelist of tweets in SQL db of 5 of my twitter account. Because we have to use Oauth after June 30th I'm searching to know how can I use oauth without connecting me manually. In fact I don't have user interface in my PHP file executed every 2 minutes.
Thanks in advance for your help.
Joel.
hello guys
i like to implement upload files in my application using jqueryui progressbar
any one know how to implement this? if you know any tutorial with php or zend framework please give a link
edited : i dont want to use flash
thanks
I am doing some debugging in php and I need to take a look at the full headers sent to the server in including the multipart form-data information stored in content disposition.
However apache_request_headers() doesn't return that information.
Any clues?
I have a text string that has been doctored to be web safe URLs i.e. non alphanumeric's are converted to "_".
What I want to do is search for the original name before it was converted, this means that I need some kind of wild card search i.e.
What I have
test__mytest
With wildcards
test??mytest
The string I would find with the wildcard search
test: mytest
Can someone tell me how to achieve this in PHP?
Thanks
Hello.
Can i ask a fundamental question. Why when I try to create a new mysqli object in php with invalid database infomation (say an incorrect database name) does it not return an error intstantly? I usually program server stuff in Java and something like this would throw back an error strait away, not after 20 seconds or so.
For example
$conn = new mysqli($host, $username, $password, $database);
Thanks!
I want to somehow round the numbers for a rating system in php like this:
4.6667 = 4.6
5.0001 = 5.1
is there any way to do that? (BTW i read the datas from a database)
Ok, so I'm the author of a CMS and I'm interested in building a CalDAV-server that enables the user to interface with my CMS through CalDAV instead of only through the web, so they can see their calendars, add todos and things like that.
I've looked at http://www.davical.org/ which is a CalDAV service built in PHP, but it has its own database and I already have the DB stuff done and just want a middle-layer services that translates, both ways, to and from my databases using my functions.
Any ideas?
Hi,
http://mysite.com/songs/company-name/song-name
i want to redirect it to
http://mysite.com/songs/index.php?name=company-name&song=song-name
i read some articles about that mod_rewrite but actually i couldnt understand exactyly, i appreciate if you can help me.
thanks
Hi everyone,
I was wondering whether it is possible to create a new database and user, from PHP, on an WHM/cPanel server.
Thanks in advance for your answers,
Constantin TOVISI
Hi,
I'm just wondering if there's a web hosting site that offers hosting for PHP and ASP.NET at the same time. It would be great if you give me a site that offers free service. I would like to use it for testing purposes only. But I could still look for affordable one.
Comments/Suggestions are welcome. Thanks.
hi guys,
I'm working on an application using Android SO and Java. I would like to send an xml file as POST to a php server, that inserts the information from the xml into a database.
how can i do that?
regards :D
How do you securely pass credit card information between pages in PHP? I am building an ecommerce application and I would like to have the users to go through the checkout like this:
Enter Information - Review - Finalize Order
Problem is that I am not sure on how to safely pass credit information from when the user inputs them to when I process it (at the Finalize Order step). I heard using sessions is insecure, even with encryption.
Any help would be appreciated!
I have a very strange problems in a PHP Soap implementation.
I have a private variable in the Server class which contains the DB name for further reference. The private variable name is "fromdb". I have a public function on the soap server where I can set this variable. $client-setFromdb. When I call it form my client works perfectly and the fromdb private variable can be set. But a second soap client call this private variable loses its value... Here is my soap server setup:
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('session.auto_start', 0);
ini_set('always_populate_raw_post_data', 1);
global $config_dir;
session_start();
/*if(!$HTTP_RAW_POST_DATA){
$HTTP_RAW_POST_DATA = file_get_contents('php://input');
}*/
$server = new SoapServer("{$config_dir['template']}import.wsdl");
$server-setClass('import');
$server-setPersistence(SOAP_PERSISTENCE_SESSION);
$server-handle();
Problem is that I passed this to the server:
$client = new SoapClient('http://import.ingatlan.net/wsdl', array('trace' = 1));
$xml='';
$xml.='';
$xml.='';
$xml.='';
$xml.='Valaki';
$xml.='';
$xml.='';
$xml.='';
$xml.='';
$tarray = array("type" = 1, "xml" = $xml);
try{
$s = $client-sendXml( $tarray );
print "$s";
}
catch( SOAPFault $exception){
print "--- SOAP exception :{$exception}---";
print "LAST REQUEST :";
var_dump($client-_getLastRequest());
print "---";
print "LAST RESPONSE :".$client-_getLastResponse();
}
So passed an Array of informations to the server. Then I got this exception:
LAST REQUEST :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><type>Array</type><xml/></SOAP-ENV:Body></SOAP-ENV:Envelope>
Can you see the Array word between the type tag? Seems that the client only passed a reference or something like this. So I totaly missed :(
I am using an image instead of a submit button for search option and use onclick events to load the results using ajax in php.Now I need to load results by hit enter also.Is their any ways to update my application without changing the image.
Thanks