Re: [PHP] about PHP's filter_var function

2012-09-20 Thread Vikash Kumar
You can use regex to check the
format: /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/
You can also explode $ip on "." and check if every part is numeric and less
than 255.


On 20 September 2012 14:44, lx  wrote:

> Hello:
>I want to use filter_var function by this way:
>
> $ip = "192.168.0.1";
>
> if( !filter_var($ip, FILTER_VALIDATE_IP) )
> {
> echo "IP is not valid";
> }
> else
> {
>  echo "IP is valid";
> }
>
> I want to check the string $ip is IP address or not.but my PHP version is
> 5.1.6.
>  and I know the filter_var requires at least PHP version 5.2.0.
> so, Any other function in PHP 5.1.6 can slove this work and replace the
> filter_var function ?
>
> Thank you, I'm a new one, so I don't know much about  PHP documentation.
>
> By the way, The PHP version is required. so I can't upgrade it.
>


Re: [PHP] Coding Web search engine in PHP

2012-08-06 Thread Vikash Kumar
On 6 August 2012 19:54, Ansry User 01  wrote:

> We are trying to code a very simple and customized search engine for
> internal purposes. Please suggest if the PHP is the way to go or suggest
> the alternatives??
>
> It would be great if you can lead us to the links which would give us a
> start!!
>
> Thanks
>


try solr. http://lucene.apache.org/solr/


>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Too many arrays! My head is exploding!

2012-05-29 Thread Vikash Kumar
On 29 May 2012 18:15, Gary  wrote:

> Okay, let's assume I have three "things", A, B, and C. I need to produce
> an array with a list of all possible combinations of them, however many
> there might be in those combinations: e.g. A, B, C, D, AB, AC, AD, BC,
> ABC (not sure if I've missed any!). Normally I'm pretty good at working
> this stuff out, but to be honest I'm struggling with this one, at least
> to do it in any kind of elegant way. Does anyone have any ideas?
>
> Idealy what I'd like is a multidimensional array depending on the number
> of "things" in the combination. Something like:
> array(2) {
>  [0]=>
>  array(3) {
>[0]=>
>array(1) {
>  ["name"]=>
>  string(7) "A"
>}
>[1]=>
>array(2) {
>  ["name"]=>
>  string(5) "B"
>}
>[2]=>
>array(2) {
>  ["name"]=>
>  string(4) "C"
>}
>  }
>  [1]=>
>  array(...) {
>[0]=>
>array(2) {
>  ["name"]=>
>  string(13) "A+B"
>}
>[1]=>
>array(2) {
>  ["name"]=>
>  string(12) "A+C"
>}
> (etc.)
>
>
>

If you are using linux, you can use the following:

$a = shell_exec("echo {a,b,c,d} && echo {a,b,c,d}{a,b,c,d} && echo
{a,b,c,d}{a,b,c,d}{a,b,c,d} && echo {a,b,c,d}{a,b,c,d}{a,b,c,d}{a,b,c,d}");

This will give you one line for 1 character combination, 1 line for 2
character combination and so on. You can then use explode to convert each
line to arrays.

Thanks,
Vikash




> --
> GaryPlease do NOT send me 'courtesy' replies off-list.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] url string being split

2012-04-26 Thread Vikash Kumar
On 26 April 2012 22:27, Chris Stinemetz  wrote:

> Hello list,
>
> I'm trying to pass a query string through $_GET but for some reason
> the array is being split on '&'. How may I avoid this so it stays
> intacted?
>
> user selection portion:
>
> while($storerow = mysql_fetch_assoc($storesresult))
> echo ''
> . $storerow['store_subject'] . ' at ' . date('m-d-Y h:i:s A',
> strtotime($storerow['real_time_date']));
>
> produces url string:
>
> http://westeng/forum/store.php?id=Wiser Communication, LLC -& - Sprague
> Ave
>
>
> print("".print_r($_GET,true).""); ## results below
>
> Array
> (
>[id] => Wiser Communication, LLC -
>[-_Sprague_Ave] =>
> )
>
> How do I make it so the string isn't split into two elements in the
> array? I want it to stay instact.
>

You should urlencode the query parameter.


>
> Thank you,
>
> Chris
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] how to execute Exe file in system

2012-02-17 Thread Vikash Kumar
backtick operator (
http://www.php.net/manual/en/language.operators.execution.php) works like
shell_exec()

On 17 February 2012 18:00, Negin Nickparsa  wrote:

> stuart $out = `$cmd`; what it will do? what is `? I didn't ever seen it
>


Re: [PHP] How to correctly validate url?

2012-01-18 Thread Vikash Kumar
Best way is to use filter_var:
http://in2.php.net/manual/en/function.filter-var.php

filter_var('http://example.com', FILTER_VALIDATE_URL)

On 18 January 2012 16:58, Tanel Tammik  wrote:

> Does anyone have a preg expression to validate the url which includes
> these special characters like ÜÕÄÖ included?
>
> Br,
> Tanel
>
>
> 18.01.2012 12:21, Mokaddim Akm kirjutas:
>
>  Sent from a handheld device
>>
>> On 18-Jan-2012, at 4:05 PM, Tanel Tammik  wrote:
>>
>>  Hello,
>>>
>>> how to correctly validate url? now the special local characters like
>>> ÜÕÖÄ etc are allowed as well...
>>>
>>>
>> The generic URI syntax mandates that new URI schemes that provide for
>> the representation of character data in a URI must, in effect,
>> represent characters from the unreserved set without translation, and
>> **should convert all other characters to bytes according to UTF-8, and
>> then percent-encode those values**. This requirement was introduced in
>> January 2005 with the publication of RFC 3986. URI schemes introduced
>> before this date are not affected.[1]
>>
>>
>> [1] 
>> http://en.wikipedia.org/wiki/**Percent-encoding
>>
>>  Br,
>>> Tanel
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] I am trying to install PHP on a Windows box, but the PHPINFO page does not load up. Where could I be going wrong?

2010-11-18 Thread Kirti Kumar




I am trying to install PHP on a  Windows box, but the PHPINFO page does not 
load 
up. Where could I be  going wrong?



[PHP] Fw: Dbase database - reg

2010-10-22 Thread kumar

22.10.2010

Dear sir

Please  help me the following code  and how to rectify the same .




Fatal error: Call to undefined function: dbase_open()

please  help me sir,

regards 

Kumar . L
SLST / ARNI / Tamilnadu / India


Re: [PHP] HTTPS SSL

2010-09-02 Thread Gaurav Kumar
Jordan,

Do you have a shared hosting? i.e. you must have hosted your site/page on
some server.

Most of the hosting server these days provide you with the feature of
installing SSL certificate.

So what you need is-

Buy a SSL certificate from a vendor. There are so many of them available
these days OR enquire with your hosting provider that if they provide a SSL
(may be a free SSL).

The certificate comes with a "KEY" (bunch of encrypted charcters). Put in
the key in your hosting panel SSL feature.

Also some server restrict the SSL to Static IP or may provide you with a
Shared SSL.

Thanks,

Gaurav Kumar

http://www.UncleCode.Com <http://www.unclecode.com/>
Download Scripts, Resources For Free
http://www.unclecode.com/2010/08/how-to-use-post-method-request-in-php-curl-execute-http-post-method-in-php-curl/
http://www.unclecode.com/2010/08/how-to-send-an-attachment-in-an-email-using-php-php-send-email-with-attachment/
http://www.unclecode.com/2009/10/mpdf-create-pdf-from-html-using-php-on-the-fly/



On Thu, Sep 2, 2010 at 5:21 PM, Jordan Jovanov wrote:

> Hello everybody
>
> I need me a little help.
> I have one web page with hhtp protocol, but i need to change in https.
> Somebody tell me that I need to create some SSL certificate.
> I  use some Apache server.
> Do you somebody know does is easy and can i do?
> Does need to write some php scripts or anything?
>
> Thanks a lot.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Thanks,

Gaurav Kumar

http://www.UncleCode.Com
Download Scripts, Resources For Free


Re: [PHP] Character Encoding for em-dash

2010-06-30 Thread Gaurav Kumar
Thanks Tedd, but I cant make this change in the application UI level code
for this problem. This application is a SAAS and we have certain quality
standards which we need to follow..

Any other suggestion?

Thanks,

-GK

On Sun, Jun 27, 2010 at 3:06 AM, tedd  wrote:

> At 9:03 PM +0530 6/17/10, Gaurav Kumar wrote:
>
>> Hi All,
>>
>> My client has a database (Sybase) in which a table column URL contains a
>> string like-
>> http://www.pjonline.com/cpd/nutrition_ _drugnutrient_interactions
>>
>> The box like un-recognized character is emdash.
>> I need to display the data on the web lets say in a HTML page where box
>> should be decoded somehow to be displayed as emdash. We cant change
>> anything
>> in the dataabse as such. So anything we need to do has to be done on the
>> fly.
>>
>> I have tried using online tool like http://2cyr.com/decode/ which just
>> converts the string to a best match decoded string and also displays box
>> as
>> emdash!!
>> This means we can do something in PHP to convert the box to emdash
>> somehow.
>>
>> Is there any possibility in php to convert to real emdash?
>>
>> I have alreasy tried urldecode, mb_convert_encoding etc. Also the
>> interesting thing is that "http://2cyr.com/decode/"; website says that the
>> string is of encoding hp-roman8!
>>
>> I want the string to look like-
>> http://www.pjonline.com/cpd/nutrition_--
>> _prescribing_parenteral_nutrition.html
>>
>> Any help?
>>
>> Thanks,
>>
>> Gaurav Kumar
>>
>
> Gaurav:
>
> When you encounter the emdash, used — to display it in html.
>
> Cheers,
>
> tedd
>
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>


[PHP] Re: Regular Expression to get the whole Comma Separated String in Array Key

2010-06-30 Thread Gaurav Kumar
Hey Richard,

Thanks!!! You have resolved my problem..

GK


On Wed, Jun 30, 2010 at 7:42 PM, Gaurav Kumar
wrote:

> Hi All,
>
> Need help in resolving the below problem-
>
>
> I would like to get the whole comma separated string into an array value-
>
> 1. $postText = "chapters 5, 6, 7, 8";
> OR
> 2. $postText = "chapters 5, 6;
> OR
> 3. $postText = "chapters 5, 6, 7";
>
> What i have done so far is-
> preg_match('/chapter[s]*[ ]*(\d+, \d+, \d+)/i', $postText, $matches);
>
> The above will exactly match the third value $postText = "chapters 5, 6,
> 7";
>
> By Above $matches will contain a value of : $matches[1] = '5, 6, 7';
>
> Now i need a SINGLE regular expression which can match first, second
> variable above or any number of comma separated string and IMPORTANTLY
> provide me that whole comma separated sting value (as above) in single array
> key element like below-
>
> $matches[1] = '5, 6, 7';
> OR
> $matches[1] = '5, 6';
> OR
> $matches[1] = '5, 6, 7, 8, 9';
>
>
> Also I have to use regular expression only as the flow of the code does not
> permit to use any other method to get comma separated string from the
> master/base string.
>
> Thanks,
>
> Gaurav Kumar
>
>
>


[PHP] Regular Expression to get the whole Comma Separated String in Array Key

2010-06-30 Thread Gaurav Kumar
Hi All,

Need help in resolving the below problem-


I would like to get the whole comma separated string into an array value-

1. $postText = "chapters 5, 6, 7, 8";
OR
2. $postText = "chapters 5, 6;
OR
3. $postText = "chapters 5, 6, 7";

What i have done so far is-
preg_match('/chapter[s]*[ ]*(\d+, \d+, \d+)/i', $postText, $matches);

The above will exactly match the third value $postText = "chapters 5, 6, 7";

By Above $matches will contain a value of : $matches[1] = '5, 6, 7';

Now i need a SINGLE regular expression which can match first, second
variable above or any number of comma separated string and IMPORTANTLY
provide me that whole comma separated sting value (as above) in single array
key element like below-

$matches[1] = '5, 6, 7';
OR
$matches[1] = '5, 6';
OR
$matches[1] = '5, 6, 7, 8, 9';


Also I have to use regular expression only as the flow of the code does not
permit to use any other method to get comma separated string from the
master/base string.

Thanks,

Gaurav Kumar


Re: [PHP] Quick session question

2010-06-24 Thread Gaurav Kumar
Danny,

I just read the email trail regarding your problem.

The very first thing-
1. Session are stored as a file on the server in a folder. Check that the
folder has read/*write* permission. (/tmp/ folder)
2. Check on the server that are the sessions really getting saved on the
server?
3. Now in case you do not have access to a sessions folder on the server
then set the session folder name/path to the folder (a new one) you can have
access to (may be root of your ftp) using
session_save_path('/httpdocs/'your-domain-folder/new-session-folder)
(provide read/write permission) before session_start() in index.php or
common header include file. This session_save_path() should be declared on
every file on the top.

Try the above and let me know if it works.

Thanks,
Gaurav Kumar

http://blog.OsWebStudio.Com





On Thu, Jun 24, 2010 at 7:54 PM, Danny  wrote:

> Hi guys,
>
> I always start new projects with the following session code-snippet:
> (In other words this is how I initialize my sessions in the index.php
> file.)
>
> ### START CODE SNIPPET
> 
> session_start();
>setcookie(session_name(),"",0,"/");
>unset($_COOKIE[session_name()]);
>$_SESSION = array();
>session_unset();
>session_destroy();
>
>session_start();
>
>
>/// Define some $_SESSION variables
>$_SESSION['sessionid'] = session_id() ;
>$_SESSION['server'] = 
> "http://localhost/~user/new_project<http://localhost/%7Euser/new_project>"
> ;
>$_SESSION['sql_dflts'] = $_SESSION['server']."/sql/sql_dflts.inc" ;
>$_SESSION['remoteaddr'] = $_SERVER['REMOTE_ADDR'] ;
>$_SESSION['remotehost'] = gethostbyaddr ( $_SERVER['REMOTE_ADDR'] )
> ;
>
>/// Include Files
>include ( $_SESSION['sql_dflts'] ) ;
>include ( $_SESSION['server']."/fnc/fnc_include_dir.inc" ) ;
>$var_include_dir = include_dir ( "fnc" ) ;
>
> ?>
> ### END CODE SNIPPET
> #
>
> All of the projects I have done so far were for business intranet purposes
> and
> it worked fine. But last week I uploaded another project to the internet
> and my
> sessions did not work.
>
> I have been using it this way since v4.0 (I think, anyway since a LONG time
> ago), but now I think it is a bit outdated and needs some kind of revision.
> Is
> this still sufficient or can you guys give some tips on a more "updated"
> way of
> starting my sessions?
>
> My php.ini file is stock-standard. I am running version 5.2.6-1 with apache
> 2.2.9 on a Debian 5.04 machine.
>
> Thank You
>
> Danny
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] Character Encoding for em-dash

2010-06-17 Thread Gaurav Kumar
Hi All,

My client has a database (Sybase) in which a table column URL contains a
string like-
http://www.pjonline.com/cpd/nutrition_ _drugnutrient_interactions

The box like un-recognized character is emdash.
I need to display the data on the web lets say in a HTML page where box
should be decoded somehow to be displayed as emdash. We cant change anything
in the dataabse as such. So anything we need to do has to be done on the
fly.

I have tried using online tool like http://2cyr.com/decode/ which just
converts the string to a best match decoded string and also displays box as
emdash!!
This means we can do something in PHP to convert the box to emdash somehow.

Is there any possibility in php to convert to real emdash?

I have alreasy tried urldecode, mb_convert_encoding etc. Also the
interesting thing is that "http://2cyr.com/decode/"; website says that the
string is of encoding hp-roman8!

I want the string to look like-
http://www.pjonline.com/cpd/nutrition_--
_prescribing_parenteral_nutrition.html

Any help?

Thanks,

Gaurav Kumar


Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Gaurav Kumar
Hi Richard, The problem is that if I am using any open source software or
any other pre-built software then I will not be able to manage through
ini_set.

Also http://www.softstack.com/freesmtp.html which vikash mentioned works
through outlook settings.

Anyways the below will help-

http://php.net/manual/en/ref.mail.php

http://glob.com.au/sendmail/

Thanks,

Gaurav Kumar
blog.oswebstudio.com



On Fri, Jan 15, 2010 at 6:21 PM, Richard Quadling
wrote:

> 2010/1/15  :
> > You can install any smtp server on your windows machine and the mail()
> will
> > work with default settings. You can check this out:
> > http://www.softstack.com/freesmtp.html
> >
> > Thanks,
> >
> > Vikash Kumar
> > http://vika.sh
> >
> >
> > On Fri, Jan 15, 2010 at 5:30 PM, Gaurav Kumar
> > wrote:
> >
> >> Sorry Kim, don't want to use phpmailer script or manually setting user
> >> accounts u/p in the script.
> >>
> >>
> >>
> >> On Fri, Jan 15, 2010 at 5:23 PM, Kim Madsen  wrote:
> >>
> >> > Hi Gaurav
> >> >
> >> > Gaurav Kumar wrote on 15/01/2010 09:54:
> >> >
> >> >
> >> >  NO SMTP
> >> >>
> >> >> Any trusted SMTP software to install on local development machine and
> >> how
> >> >> to
> >> >> set it up with php to send an email?
> >> >>
> >> >> Also just providing the SMTP server details in php.ini will not work
> for
> >> >> me
> >> >> as this requires authentication/credentials etc..
> >> >>
> >> >
> >> > Get PHPmailer and make a gmail account that you connect to and mail
> >> > through.
> >> >
> >> > --
> >> > Kind regards
> >> > Kim Emax - masterminds.dk
> >> >
> >>
> >
>
> You only need a local SMTP server if you want to hold and relay mail.
>
> If you want to send mail directly to the recipients SMTP server you
> can do that with standard PHP.
>
> getmxrr() is your friend here.
>
> You provide it with the domain of the recipient and you get back the
> SMTP server(s) associated with that domain.
>
> Now, you can send the message to THEIR smtp server ...
>
> ini_set('SMTP', );
>
> where  is one of the servers returned from getmxrr().
>
> No authentication required.
>
>
>
>
> --
> -
> Richard Quadling
> "Standing on the shoulders of some very clever giants!"
> EE : http://www.experts-exchange.com/M_248814.html
> Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
> ZOPA : http://uk.zopa.com/member/RQuadling
>


Re: [PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Gaurav Kumar
Sorry Kim, don't want to use phpmailer script or manually setting user
accounts u/p in the script.



On Fri, Jan 15, 2010 at 5:23 PM, Kim Madsen  wrote:

> Hi Gaurav
>
> Gaurav Kumar wrote on 15/01/2010 09:54:
>
>
>  NO SMTP
>>
>> Any trusted SMTP software to install on local development machine and how
>> to
>> set it up with php to send an email?
>>
>> Also just providing the SMTP server details in php.ini will not work for
>> me
>> as this requires authentication/credentials etc..
>>
>
> Get PHPmailer and make a gmail account that you connect to and mail
> through.
>
> --
> Kind regards
> Kim Emax - masterminds.dk
>


[PHP] SMTP Local development to Send email in PHP; Windows Platform/ XP with no IIS

2010-01-15 Thread Gaurav Kumar
Hi All, Ash, Angelo,

Any ideas how to send an email in PHP on windows platform/xp on local
development machine.

System Configuration
PHP 5.2
Apache 2
No ISS
NO SMTP

Any trusted SMTP software to install on local development machine and how to
set it up with php to send an email?

Also just providing the SMTP server details in php.ini will not work for me
as this requires authentication/credentials etc..


Thanks,

Gaurav Kumar
blog.oswebstudio.com


Re: [PHP] Open source project management tool - PHP

2009-12-18 Thread Gaurav Kumar
OK one more the list http://dotproject.net/

Its a nice one with all project management features. Easy to use. Just
checkout the website.

Gaurav Kumar
blog.oswebstudio.com

On Fri, Dec 18, 2009 at 12:16 AM, Robert Cummings wrote:

> Angelo Zanetti wrote:
>
>> Hi guys
>> I would like to know what open source project management tools you use for
>> your projects.
>>
>> We are looking at installing one that is PHP based and is easy to use.
>>
>> We have found:
>> http://www.projectpier.org/
>>
>> and
>>
>> http://trac.edgewall.org/
>>
>>
>> Has anyone used the above and how did you find them? Also are there any
>> others you would recommend or not recommend and why?
>>
>
> I use Mantis for most bug tracking needs. However, I've recently rolled out
> OpenGoo for a couple of different clients.
>
> http://fengoffice.com/web/community/community_index.php
>
> Cheers,
> Rob.
> --
> http://www.interjinn.com
> Application and Templating Framework for PHP
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-14 Thread Gaurav Kumar
Sorry buddy, I cant think of anything else which is going on wrong.


2009/12/14 René Fournier 

>
> PHP Version 5.3.0
>
> Directive Local Value Master Value
> allow_call_time_pass_reference Off Off
> allow_url_fopen On
>
>
> On 2009-12-14, at 12:26 AM, Gaurav Kumar wrote:
>
> What is the value for 
> "allow_url_fopen<http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen>"
> in your php.ini? It should be 1.
>
>
>
>
>
> 2009/12/13 René Fournier 
>
>> CURL works (remote and local)
>> file_get_contents() doesn't work (remote or local).
>>
>>
>>
>> On 2009-12-13, at 4:39 PM, Gaurav Kumar wrote:
>>
>> Ok Agreed.
>>
>> Lets do one last chance to ensure that your system is allowing external
>> connections or connection to other systems in the network-
>>
>> Use Curl to get in the file contents. Check your PHP that Curl is enabled.
>> Through phpinfo();
>>
>> If the script output the google page then this means that there is nothing
>> that is stopping you form getting in the content externally.
>>
>> > // $str =  file_get_contents ('http://www.google.com');
>> // echo $str;
>>
>>
>> // create a new cURL resource
>> $ch = curl_init();
>>
>> // set URL and other appropriate options
>> curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in";); //
>> http://www.google.com
>> curl_setopt($ch, CURLOPT_HEADER, 0);
>>
>> // grab URL and pass it to the browser
>> curl_exec($ch);
>>
>> // close cURL resource, and free up system resources
>> curl_close($ch);
>>
>> ?>
>>
>> Thanks,
>>
>> Gaurav Kumar
>>
>>
>>
>> 2009/12/13 René Fournier 
>>
>>> The thing is, the file_get_contents() fails the same way on local URLs --
>>> that is, web sites hosted on the same machine. Or even using the machine's
>>> own IP address.
>>>
>>> On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote:
>>>
>>> Hi Rene,
>>>
>>> The only thing which is a hurdle is that your system/computer is not
>>> allowing external connections. There seems to be nothing else wrong.
>>>
>>> I strongly suggest check your system firewall, any central server
>>> settings through which your system gets internet access, any antivirus s/w
>>> installed etc.. this can be the only reason. Something is stopping you to
>>> access external connection.
>>>
>>> Let me know when your problem is fixed.
>>> Also I tried the below code and it works fine-
>>>
>>> >> $str =  file_get_contents ('http://www.google.com');
>>> echo $str;
>>> ?>
>>>
>>> Thanks,
>>>
>>> Gaurav Kumar
>>>
>>>
>>>
>>> 2009/12/11 René Fournier 
>>>
>>>> Hi Gaurav,
>>>>
>>>> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>>>>
>>>> A very typical problem. Good you sent the error message.
>>>>
>>>> This problem can be caused due to one of the following-
>>>>
>>>> 1. I have faced similar problem due to local firewall settings.
>>>>
>>>>
>>>> Don't think this is it, since (1) the firewall settings haven't changed,
>>>> and (2) other machines on the same network can execute this same code and
>>>> function (but they aren't running OS X Server 10.6.
>>>>
>>>> 2. Try some other domain; i.e. other than google com. Try some of the
>>>> local area website with a particular page like
>>>> www.somedomain.com/somefile.html
>>>>
>>>>
>>>> I've tried many different external and local web sites, and they all
>>>> fail.
>>>>
>>>> 3. Some times the remote host does not allow you to connect to get the
>>>> file contents.
>>>>
>>>>
>>>> (Also not the cause -- as explained above.)
>>>>
>>>>
>>>> 4. # 3 can be either way round from both the ends a) you host server
>>>> does not allow external connections b) Remote host does not allow anonymous
>>>> connection.
>>>>
>>>>
>>>> Thanks for the options. I don't think they apply in this case. If you
>>>> have any other suggestions on what to do, I would welcome them.
>>>>
>>>>
>>>>
>

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-13 Thread Gaurav Kumar
What is the value for
"allow_url_fopen<http://www.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen>"
in your php.ini? It should be 1.





2009/12/13 René Fournier 

> CURL works (remote and local)
> file_get_contents() doesn't work (remote or local).
>
>
>
> On 2009-12-13, at 4:39 PM, Gaurav Kumar wrote:
>
> Ok Agreed.
>
> Lets do one last chance to ensure that your system is allowing external
> connections or connection to other systems in the network-
>
> Use Curl to get in the file contents. Check your PHP that Curl is enabled.
> Through phpinfo();
>
> If the script output the google page then this means that there is nothing
> that is stopping you form getting in the content externally.
>
>  // $str =  file_get_contents ('http://www.google.com');
> // echo $str;
>
>
> // create a new cURL resource
> $ch = curl_init();
>
> // set URL and other appropriate options
> curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in";); //
> http://www.google.com
> curl_setopt($ch, CURLOPT_HEADER, 0);
>
> // grab URL and pass it to the browser
> curl_exec($ch);
>
> // close cURL resource, and free up system resources
> curl_close($ch);
>
> ?>
>
> Thanks,
>
> Gaurav Kumar
>
>
>
> 2009/12/13 René Fournier 
>
>> The thing is, the file_get_contents() fails the same way on local URLs --
>> that is, web sites hosted on the same machine. Or even using the machine's
>> own IP address.
>>
>> On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote:
>>
>> Hi Rene,
>>
>> The only thing which is a hurdle is that your system/computer is not
>> allowing external connections. There seems to be nothing else wrong.
>>
>> I strongly suggest check your system firewall, any central server settings
>> through which your system gets internet access, any antivirus s/w installed
>> etc.. this can be the only reason. Something is stopping you to access
>> external connection.
>>
>> Let me know when your problem is fixed.
>> Also I tried the below code and it works fine-
>>
>> > $str =  file_get_contents ('http://www.google.com');
>> echo $str;
>> ?>
>>
>> Thanks,
>>
>> Gaurav Kumar
>>
>>
>>
>> 2009/12/11 René Fournier 
>>
>>> Hi Gaurav,
>>>
>>> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>>>
>>> A very typical problem. Good you sent the error message.
>>>
>>> This problem can be caused due to one of the following-
>>>
>>> 1. I have faced similar problem due to local firewall settings.
>>>
>>>
>>> Don't think this is it, since (1) the firewall settings haven't changed,
>>> and (2) other machines on the same network can execute this same code and
>>> function (but they aren't running OS X Server 10.6.
>>>
>>> 2. Try some other domain; i.e. other than google com. Try some of the
>>> local area website with a particular page like
>>> www.somedomain.com/somefile.html
>>>
>>>
>>> I've tried many different external and local web sites, and they all
>>> fail.
>>>
>>> 3. Some times the remote host does not allow you to connect to get the
>>> file contents.
>>>
>>>
>>> (Also not the cause -- as explained above.)
>>>
>>>
>>> 4. # 3 can be either way round from both the ends a) you host server does
>>> not allow external connections b) Remote host does not allow anonymous
>>> connection.
>>>
>>>
>>> Thanks for the options. I don't think they apply in this case. If you
>>> have any other suggestions on what to do, I would welcome them.
>>>
>>>
>>>
>>> Gaurav Kumar
>>> blog.oswebstudio.com
>>>
>>>
>>>
>>> On Thu, Dec 10, 2009 at 9:01 PM, René Fournier wrote:
>>>
>>>> I thought error_reporting would display them, but I guess php.ini had
>>>> them suppressed. Anyway, with:
>>>>
>>>> >>>
>>>> error_reporting(-1);
>>>> ini_set('display_errors', 1);
>>>> set_time_limit(0);
>>>> var_dump (file_get_contents ('http://www.google.com'));
>>>>
>>>> ?>
>>>>
>>>> I get:
>>>>
>>>> Warning: file_get_contents(http://www.google.com): failed to open
>>>> stream: Operation now in progress in //.php on line 

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-13 Thread Gaurav Kumar
Ok Agreed.

Lets do one last chance to ensure that your system is allowing external
connections or connection to other systems in the network-

Use Curl to get in the file contents. Check your PHP that Curl is enabled.
Through phpinfo();

If the script output the google page then this means that there is nothing
that is stopping you form getting in the content externally.

http://www.google.com');
// echo $str;


// create a new cURL resource
$ch = curl_init();

// set URL and other appropriate options
curl_setopt($ch, CURLOPT_URL, "http://www.google.co.in";); //
http://www.google.com
curl_setopt($ch, CURLOPT_HEADER, 0);

// grab URL and pass it to the browser
curl_exec($ch);

// close cURL resource, and free up system resources
curl_close($ch);

?>

Thanks,

Gaurav Kumar



2009/12/13 René Fournier 

> The thing is, the file_get_contents() fails the same way on local URLs --
> that is, web sites hosted on the same machine. Or even using the machine's
> own IP address.
>
> On 2009-12-13, at 4:00 AM, Gaurav Kumar wrote:
>
> Hi Rene,
>
> The only thing which is a hurdle is that your system/computer is not
> allowing external connections. There seems to be nothing else wrong.
>
> I strongly suggest check your system firewall, any central server settings
> through which your system gets internet access, any antivirus s/w installed
> etc.. this can be the only reason. Something is stopping you to access
> external connection.
>
> Let me know when your problem is fixed.
> Also I tried the below code and it works fine-
>
>  $str =  file_get_contents ('http://www.google.com');
> echo $str;
> ?>
>
> Thanks,
>
> Gaurav Kumar
>
>
>
> 2009/12/11 René Fournier 
>
>> Hi Gaurav,
>>
>> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>>
>> A very typical problem. Good you sent the error message.
>>
>> This problem can be caused due to one of the following-
>>
>> 1. I have faced similar problem due to local firewall settings.
>>
>>
>> Don't think this is it, since (1) the firewall settings haven't changed,
>> and (2) other machines on the same network can execute this same code and
>> function (but they aren't running OS X Server 10.6.
>>
>> 2. Try some other domain; i.e. other than google com. Try some of the
>> local area website with a particular page like
>> www.somedomain.com/somefile.html
>>
>>
>> I've tried many different external and local web sites, and they all fail.
>>
>> 3. Some times the remote host does not allow you to connect to get the
>> file contents.
>>
>>
>> (Also not the cause -- as explained above.)
>>
>>
>> 4. # 3 can be either way round from both the ends a) you host server does
>> not allow external connections b) Remote host does not allow anonymous
>> connection.
>>
>>
>> Thanks for the options. I don't think they apply in this case. If you have
>> any other suggestions on what to do, I would welcome them.
>>
>>
>>
>> Gaurav Kumar
>> blog.oswebstudio.com
>>
>>
>>
>> On Thu, Dec 10, 2009 at 9:01 PM, René Fournier wrote:
>>
>>> I thought error_reporting would display them, but I guess php.ini had
>>> them suppressed. Anyway, with:
>>>
>>> >>
>>> error_reporting(-1);
>>> ini_set('display_errors', 1);
>>> set_time_limit(0);
>>> var_dump (file_get_contents ('http://www.google.com'));
>>>
>>> ?>
>>>
>>> I get:
>>>
>>> Warning: file_get_contents(http://www.google.com): failed to open
>>> stream: Operation now in progress in //.php on line 7 bool(false)
>>>
>>> Does that help with the diagnosis?
>>>
>>>
>>> On 2009-12-10, at 12:28 AM, Richard Quadling wrote:
>>>
>>> > 2009/12/9 René Fournier :
>>> >> It is, and I use curl elsewhere in the same script to fetch remote
>>> content.
>>> >> This exact same function works fine on my MacBook Pro (10.6 client,
>>> PHP 5.3), and *was* previously working fine under Server 10.4.11 and PHP
>>> 5.3,
>>> >>
>>> >> On 2009-12-09, at 11:10 PM, laruence wrote:
>>> >>
>>> >>> try
>>> >>> wget http://www.google.com in your command line to see whether the
>>> network is reachable
>>> >>>
>>> >>> LinuxManMikeC wrote:
>>> >>>>
>>> >>>> On Wed, Dec 9, 2009 

Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-12 Thread Gaurav Kumar
Hi Rene,

The only thing which is a hurdle is that your system/computer is not
allowing external connections. There seems to be nothing else wrong.

I strongly suggest check your system firewall, any central server settings
through which your system gets internet access, any antivirus s/w installed
etc.. this can be the only reason. Something is stopping you to access
external connection.

Let me know when your problem is fixed.
Also I tried the below code and it works fine-

http://www.google.com');
echo $str;
?>

Thanks,

Gaurav Kumar



2009/12/11 René Fournier 

> Hi Gaurav,
>
> On 2009-12-11, at 2:55 PM, Gaurav Kumar wrote:
>
> A very typical problem. Good you sent the error message.
>
> This problem can be caused due to one of the following-
>
> 1. I have faced similar problem due to local firewall settings.
>
>
> Don't think this is it, since (1) the firewall settings haven't changed,
> and (2) other machines on the same network can execute this same code and
> function (but they aren't running OS X Server 10.6.
>
> 2. Try some other domain; i.e. other than google com. Try some of the local
> area website with a particular page like www.somedomain.com/somefile.html
>
>
> I've tried many different external and local web sites, and they all fail.
>
> 3. Some times the remote host does not allow you to connect to get the file
> contents.
>
>
> (Also not the cause -- as explained above.)
>
>
> 4. # 3 can be either way round from both the ends a) you host server does
> not allow external connections b) Remote host does not allow anonymous
> connection.
>
>
> Thanks for the options. I don't think they apply in this case. If you have
> any other suggestions on what to do, I would welcome them.
>
>
>
> Gaurav Kumar
> blog.oswebstudio.com
>
>
>
> On Thu, Dec 10, 2009 at 9:01 PM, René Fournier wrote:
>
>> I thought error_reporting would display them, but I guess php.ini had them
>> suppressed. Anyway, with:
>>
>> >
>> error_reporting(-1);
>> ini_set('display_errors', 1);
>> set_time_limit(0);
>> var_dump (file_get_contents ('http://www.google.com'));
>>
>> ?>
>>
>> I get:
>>
>> Warning: file_get_contents(http://www.google.com): failed to open stream:
>> Operation now in progress in //.php on line 7 bool(false)
>>
>> Does that help with the diagnosis?
>>
>>
>> On 2009-12-10, at 12:28 AM, Richard Quadling wrote:
>>
>> > 2009/12/9 René Fournier :
>> >> It is, and I use curl elsewhere in the same script to fetch remote
>> content.
>> >> This exact same function works fine on my MacBook Pro (10.6 client, PHP
>> 5.3), and *was* previously working fine under Server 10.4.11 and PHP 5.3,
>> >>
>> >> On 2009-12-09, at 11:10 PM, laruence wrote:
>> >>
>> >>> try
>> >>> wget http://www.google.com in your command line to see whether the
>> network is reachable
>> >>>
>> >>> LinuxManMikeC wrote:
>> >>>>
>> >>>> On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC <
>> linuxmanmi...@gmail.com> wrote:
>> >>>>
>> >>>>> On Wed, Dec 9, 2009 at 6:45 AM, René Fournier 
>> wrote:
>> >>>>>
>> >>>>>> Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3.
>> Any call of file_get_contents() on a local file works fine -- the file is
>> read and returned. But any call of file_get_contents on a url -- any url,
>> local or remote -- always returns false.
>> >>>>>>
>> >>>>>> var_dump (file_get_contents 
>> >>>>>> ('http://www.google.com/')<http://www.google.com/%27%29>
>> );
>> >>>>>>
>> >>>>>> bool(false)
>> >>>>>>
>> >>>>>> I've checked php.ini, and the obvious seems okay:
>> >>>>>>
>> >>>>>>allow_url_fopen => On => On
>> >>>>>>
>> >>>>>> Any ideas?
>> >>>>>>
>> >>>>>> ...Rene
>> >>>>>>
>> >>>>>
>> http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
>> >>>>>
>> >>>>>
>> >>>>
>> >>>> "I've checked php.ini"
>> >>>> Right, must remember not to reply to stuff till I'm awake. :-D
>> >>>>
>> >>>> --
>> >>>> PHP General Mailing List (http://www.php.net/)
>> >>>> To unsubscribe, visit: http://www.php.net/unsub.php
>> >>>>
>> >>>>
>> >>>
>> >>> --
>> >>> <2866791487_dbbbdddf9e.jpg>惠 新宸 xinchen.hui | 商务搜索部 |
>> (+8610)82602112-7974 | <2866349865_203e53a6c6.jpg>:laruence
>> >>
>> >>
>> >
>> > Do you have ANY errors/warning/notices?
>> >
>> >
>> >
>> > --
>> > -
>> > Richard Quadling
>> > "Standing on the shoulders of some very clever giants!"
>> > EE : http://www.experts-exchange.com/M_248814.html
>> > Zend Certified Engineer :
>> http://zend.com/zce.php?c=ZEND002498&r=213474731
>> > ZOPA : http://uk.zopa.com/member/RQuadling
>>
>>
>
>


Re: [PHP] Upload dir

2009-12-10 Thread Gaurav Kumar
OK you used ini_get try using ini_set and set the temporary directory on
your server of your choice at run time in your script (top of the script or
any config file if you have one).

REMEMBER that you have access to that directory, should have full
permissions and also check the absolute server path is correct while you set
the directory.


More information on how to use ini_set to set the directory path- try
googling...

Gaurav Kumar
blog.oswebstudio.com



On Fri, Dec 11, 2009 at 10:59 AM, kranthi  wrote:

> How can i change the temporary upload directory?
> var_dump(ini_get('upload_tmp_dir'));  gives me (and that is set in
> php.ini)
> string '/var/www/cgi-bin' (length=16)
>
> but
> var_dump($_FILES) gives
> me
> 'tmp_name' => string '/tmp/phpbSZ6WP' (length=14)
>
> var_dump(file_exists($_FILES['file']['tmp_name']));  gives me  (/tmp
> has permissions drwxrwxrwt and i never used file_move_upload or any
> similar functions)
> boolean false
>
> am I missing something here?
> Kranthi.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] file_get_contents ($file) works -- file_get_contents ($url) returns false

2009-12-10 Thread Gaurav Kumar
A very typical problem. Good you sent the error message.

This problem can be caused due to one of the following-

1. I have faced similar problem due to local firewall settings.
2. Try some other domain; i.e. other than google com. Try some of the local
area website with a particular page like www.somedomain.com/somefile.html
3. Some times the remote host does not allow you to connect to get the file
contents.
4. # 3 can be either way round from both the ends a) you host server does
not allow external connections b) Remote host does not allow anonymous
connection.

Hope this helps..

Gaurav Kumar
blog.oswebstudio.com



On Thu, Dec 10, 2009 at 9:01 PM, René Fournier  wrote:

> I thought error_reporting would display them, but I guess php.ini had them
> suppressed. Anyway, with:
>
> 
> error_reporting(-1);
> ini_set('display_errors', 1);
> set_time_limit(0);
> var_dump (file_get_contents ('http://www.google.com'));
>
> ?>
>
> I get:
>
> Warning: file_get_contents(http://www.google.com): failed to open stream:
> Operation now in progress in //.php on line 7 bool(false)
>
> Does that help with the diagnosis?
>
>
> On 2009-12-10, at 12:28 AM, Richard Quadling wrote:
>
> > 2009/12/9 René Fournier :
> >> It is, and I use curl elsewhere in the same script to fetch remote
> content.
> >> This exact same function works fine on my MacBook Pro (10.6 client, PHP
> 5.3), and *was* previously working fine under Server 10.4.11 and PHP 5.3,
> >>
> >> On 2009-12-09, at 11:10 PM, laruence wrote:
> >>
> >>> try
> >>> wget http://www.google.com in your command line to see whether the
> network is reachable
> >>>
> >>> LinuxManMikeC wrote:
> >>>>
> >>>> On Wed, Dec 9, 2009 at 8:02 AM, LinuxManMikeC <
> linuxmanmi...@gmail.com> wrote:
> >>>>
> >>>>> On Wed, Dec 9, 2009 at 6:45 AM, René Fournier 
> wrote:
> >>>>>
> >>>>>> Strange problem I'm having on Mac OS X Server 10.6 running PHP 5.3.
> Any call of file_get_contents() on a local file works fine -- the file is
> read and returned. But any call of file_get_contents on a url -- any url,
> local or remote -- always returns false.
> >>>>>>
> >>>>>> var_dump (file_get_contents 
> >>>>>> ('http://www.google.com/')<http://www.google.com/%27%29>
> );
> >>>>>>
> >>>>>> bool(false)
> >>>>>>
> >>>>>> I've checked php.ini, and the obvious seems okay:
> >>>>>>
> >>>>>>allow_url_fopen => On => On
> >>>>>>
> >>>>>> Any ideas?
> >>>>>>
> >>>>>> ...Rene
> >>>>>>
> >>>>>
> http://us2.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen
> >>>>>
> >>>>>
> >>>>
> >>>> "I've checked php.ini"
> >>>> Right, must remember not to reply to stuff till I'm awake. :-D
> >>>>
> >>>> --
> >>>> PHP General Mailing List (http://www.php.net/)
> >>>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>>
> >>>>
> >>>
> >>> --
> >>> <2866791487_dbbbdddf9e.jpg>惠 新宸 xinchen.hui | 商务搜索部 |
> (+8610)82602112-7974 | <2866349865_203e53a6c6.jpg>:laruence
> >>
> >>
> >
> > Do you have ANY errors/warning/notices?
> >
> >
> >
> > --
> > -
> > Richard Quadling
> > "Standing on the shoulders of some very clever giants!"
> > EE : http://www.experts-exchange.com/M_248814.html
> > Zend Certified Engineer :
> http://zend.com/zce.php?c=ZEND002498&r=213474731
> > ZOPA : http://uk.zopa.com/member/RQuadling
>
>


Re: [PHP] Force-Saving an Audio File

2009-12-09 Thread Gaurav Kumar
You can do two things-

1. Read the file by providing a base directory path of the server where the
file exist.
Something like- //htdocs/httpfolder/files/audio/yourfile.mp3
You can take this in a variable " //htdocs/httpfolder/files/audio/".

2. Try using file_get_contents.
Something like $file = file_get_contents('
http://www.example.com/audio/file.mp3', false, $context);

Hope this helps.

Gaurav Kumar
Blog.OsWebStudio.com


On Wed, Dec 9, 2009 at 8:06 AM, c...@hosting4days.com  wrote:

> Hi folks,
>
> I'm trying to force save .mp3 files so this is a test page (found on the
> net). It works fine when:
> $directory = "";  // so the audio is in the same local directory
>
> but fails when I use a REAL web directory -  (the audio file is here -
> http://mysite.com/test1/audio.mp3 )
> $directory = "http://mysite.com/test1/";;
>
> says - The file $file was not found.
>
> Q: Any ideas how to get it to download from the website?
>
> =
>
>
>
> 
> $file = 'audio1.mp3';
>
> $directory = "http://mysite.com/test1/";;
> //$directory = "";
> $path = "$directory$file";
>
> if(ini_get('zlib.output_compression'))
> ini_set('zlib.output_compression', 'Off');
>
> $file_extension = strtolower(substr(strrchr($path,"."),1));
>
> if( $file == "" )
> {
> echo "
> 
> File not found.
> 
> 
> File not found.
> 
> ";
> exit;
> } elseif (! file_exists( $path ) )
> {
> echo "
> 
> The file $file was not found.
> 
> 
> The file $file was not found.
> - path - $path
> 
> ";exit;
> };
> switch( $file_extension )
> {
> case "pdf": $ctype="application/pdf"; break;
> case "zip": $ctype="application/zip"; break;
> case "doc": $ctype="application/msword"; break;
> case "xls": $ctype="application/vnd.ms-excel"; break;
> case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
> case "gif": $ctype="image/gif"; break;
> case "png": $ctype="image/png"; break;
> case "jpeg":
> case "jpg": $ctype="image/jpg"; break;
> case "wav":
> case "mp3": $ctype="application/iTunes"; break;
> default: $ctype="application/force-download";
> }
> header("Pragma: public");
> header("Expires: 0");
> header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
> header("Cache-Control: private",false);
> header("Content-Type: $ctype");
> header("Content-Disposition: attachment; filename=\"".basename($path)."\";"
> );
> header("Content-Transfer-Encoding: binary");
> header("Content-Length: ".filesize($path));
>
> readfile("$path");
> exit();
>
> ?>
>
>
>
> Thanks,
> c...@hosting4days.com
>
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Correct handling _POST[] and implode. PHP5

2009-10-09 Thread Gaurav Kumar
Its Simple...

Its very obvious that $_POST["color"] is not an array.

do something like this and you wil get the values.

$arr_color = $_POST["colors"];

//iterate over the array
foreach($arr_color as $val)
{
$str_color .= ", "  . $val;
}

You are done.

Gaurav Kumar
Teach Lead Open Source Technologies



On Fri, Oct 9, 2009 at 11:14 AM, bearsfoot wrote:

>
> Hi all,
>
> I have a form that has has an array of information.  Mulitple checkboxes
> can
> be selected.
>
> Choose the colors:
> 
> Green
>  Yellow
>  Red
>  Gray
>
> When processing the form..
>
> echo $_POST['Colors'] . ''; // outputs 'Array'
>
> if ( isset($_POST['Colors']) ) {
> $_POST['Colors'] = implode(', ', $_POST['Colors']); //Converts an array
> into a single string
> }
>
>   echo "Colors you chose: {$_POST['Colors']}";
>
> I get the following error when using the implode function.
>
> Warning: implode() [function.implode]: Bad arguments
>
> What I doing wrong ?
>
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://www.nabble.com/Correct-handling-_POST---and-implode.-PHP5-tp25815789p25815789.html
> Sent from the PHP - General mailing list archive at Nabble.com.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


RE: [PHP] Native support to MS SQL Server

2009-10-08 Thread Rakesh Kumar
Yes correct it will work on old version 

-Original Message-
From: Raymond Irving [mailto:xwis...@yahoo.com] 
Sent: Friday, October 09, 2009 9:56 AM
To: php-general@lists.php.net
Subject: [PHP] Native support to MS SQL Server

Hello,

Will we ever see drivers for MS SQL Server in PHP5?

I know MS is working on drivers for PHP 5.3 but it's not clear if they will
ever produce a PDO driver for PHP. PDO is the way to go.

The other thing is that MS latest version of the sqlsrv driver requires SQL
Native Client 2008 and is not compatible with previous versions of the
client. This means that client will have to either install or upgrade their
version SQL Client. It would be great if the driver did not require an
addition software package to be installed.

The lack of MSSQL support has cause developers to search the web (sometimes
in vain) looking for driver support. This often times resulted in an
alternative programming languages been chosen for the project.



---
"Print this mail only if absolutely necessary. Save Paper. Save Trees."  

"This e-mail message may contain confidential, proprietary or legally 
privileged information. It 
should not be used by anyone who is not the original intended recipient. If you 
have erroneously 
received this message, please delete it immediately and notify the sender. The 
recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies,  
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity 
of/over the contents
of the information contained in e-mail transmissions and further acknowledges 
that any views 
expressed in this message are those of the individual sender and no binding 
nature of the message
shall be implied or assumed unless the sender does so expressly with due 
authority of ICICI Group.
Before opening any attachments please check them for viruses and defects." 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] avoid Denial of Service

2009-10-08 Thread Gaurav Kumar
Not sure what exactly you are looking for.

Anyways, some common practice are request for API key, username / password
tokens before providing access to a service.

Thanks,

Gaurav Kumar


On Thu, Oct 8, 2009 at 7:06 PM, Gerardo Benitez wrote:

> Hi everybody!
>
>
> I want to get some tips about how avoid a attack of Denial of service.  May
> be somebody can about your experience with Php o some configuration of
> apache, o other software that help in these case.
>
>
> Thanks in advance.
>
>
> --
> Gerardo Benitez
>


Re: [PHP] Apache Rewrite Issues

2009-10-07 Thread Gaurav Kumar
Hey Russell,

After Going through all the threads in this post, it is correct to say, GET
Rid of the space. Use "-"  hyphen  for SEO friendly URL's. Its completely
OK.

Other thing which is very handy is urlencode and urldecode functions. When
you are sending a query string use urlencode function. This will preserve
the query string variable as "Test Story" and not as just "Test"; even if
there are spaces in the variable.

Gaurav Kumar
Tech Lead Open Source Solutions

On Wed, Oct 7, 2009 at 4:22 PM, Russell Seymour <
russell.seym...@turtlesystems.co.uk> wrote:

> Morning,
>
> I am trying to make my URLs more search engine friendly and I have come up
> against a problem.
>
> I want the following URL:
>
>mysite.example.com/articles/Test Story
>
> to be proxied to
>
>mysite.example.com/index.php?m=articles&t=Test%20Story
>
> I have the following rule in my Apache conf
>
>RewriteRule ^/articles/(.*) index.php?m=articles&t=$1 [P,L]
>
> Now if I run with this configuration, PHP strips the query string back at
> the space, so my query string ends up looking like
>
>[QUERY_STRING] =>  m=articles&t=Test
>
> even though the log file for the rewrite shows that the full query is being
> passed.
>
> But if I change the RewriteRule to be a Rewrite instead of a Proxy I get
>
>[QUERY_STRING] =>  m=articles&t=Test%20Story
>
> So something is happening when the system is proxying the request.
> Adding %20 into the URL does not fix the problem when proxy is enabled
> either.
>
> I have search around on the Internet, and people talk about using urlencode
> etc, this is fine when
> PHP is creating the URL but not when Apache is doing the rewrite.
>
> I apologise if people feel this is on the wrong list, but as far as I can
> tell from the rewrite logs the data is coming all
> the way through to PHP which is truncating it.  This is purely my
> observation.
>
> Apache version: 2.2.11
> PHP Version:5.3.0
>
> Any help is gratefully recieved.
>
> Thanks, Russell
>
>
>


Re: [PHP] Best Practice to Create Dynamic URL's- With Username

2009-09-21 Thread Gaurav Kumar
Thanks Ashley and all the folks out there...

On Mon, Sep 21, 2009 at 3:25 PM, Ashley Sheridan
wrote:

> On Mon, 2009-09-21 at 15:20 +0530, Gaurav Kumar wrote:
> > I totally agree with this architecture.
> >
> > You are correct, I am just in the starting phase of the project and in
> > fact still need to define the architecture in detail.
> >
> > Now the question I asked in my last reply is still to be answered?
> >
> > Gaurav Kumar
> > OSWebstudio.Com
> >
> > On Mon, Sep 21, 2009 at 3:06 PM, Andrea Giammarchi
> >  wrote:
> >
> >
> > >
> > > Question I was Asked by Andrea- "mod_reqrite or .htaccess is
> > the answer, but
> > > I wonder why you choose /user/username rather than
> > just /username a la
> > > twitter."
> > >
> > > I will be using many other aspects of my users something
> > like
> > > "/projects/username/"; "/gallery/username/".
> >
> >
> > well, it does not matter if this service is user based.
> >
> > /username/ #as user home page
> > /username/projects/ #as user projects
> > /username/gallery/ #as user gallery
> > /username/etc ...
> >
> > it's just a silly point but from user home page you isntantly
> > know if user exists and you instantly know subsections
> >
> > In your way you assume that there is a gallery for that user
> > while he could have created only projects, without galleries.
> > So one search failed, while to go in the user page I need to
> > digit /user/ before, not a big deal but we are in tinyurl and
> > bit.ly era
> >
> > Google Code put simply a /p/ as prefix plus the project name
> > plus subsection
> >
> > /p/myprojname/
> > /p/myprojname/wiki
> >
> > since you are starting now, maybe you could consider this
> > semantic alternative, if it suits your requirements.
> >
> > Regards
> >
> > > > Thanks,
> > > > Ash
> > > > http://www.ashleysheridan.co.uk
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> > __
> > check out the rest of the Windows Live™. More than mail–
> > Windows Live™ goes way beyond your inbox. More than messages
> >
> For help with the mod_rewrite, a Google search never goes amiss, first
> result I found for 'mod_rewrite example' is
> http://www.workingwith.me.uk/articles/scripting/mod_rewrite . I looked
> at it quickly and it does cover what you need.
>
> As for what you get as $_GET parameters, that's entirely up to you, and
> as you will see from the above link, it's fairly simple to mess about
> with.
>
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>


Re: [PHP] Best Practice to Create Dynamic URL's- With Username

2009-09-21 Thread Gaurav Kumar
I totally agree with this architecture.

You are correct, I am just in the starting phase of the project and in fact
still need to define the architecture in detail.

Now the question I asked in my last reply is still to be answered?

Gaurav Kumar
OSWebstudio.Com

On Mon, Sep 21, 2009 at 3:06 PM, Andrea Giammarchi wrote:

>
>
> >
> > Question I was Asked by Andrea- "mod_reqrite or .htaccess is the answer,
> but
> > I wonder why you choose /user/username rather than just /username a la
> > twitter."
> >
> > I will be using many other aspects of my users something like
> > "/projects/username/"; "/gallery/username/".
>
> well, it does not matter if this service is user based.
>
> /username/ #as user home page
> /username/projects/ #as user projects
> /username/gallery/ #as user gallery
> /username/etc ...
>
> it's just a silly point but from user home page you isntantly know if user
> exists and you instantly know subsections
>
> In your way you assume that there is a gallery for that user while he could
> have created only projects, without galleries.
> So one search failed, while to go in the user page I need to digit /user/
> before, not a big deal but we are in tinyurl and bit.ly era
>
> Google Code put simply a /p/ as prefix plus the project name plus
> subsection
>
> /p/myprojname/
> /p/myprojname/wiki
>
> since you are starting now, maybe you could consider this semantic
> alternative, if it suits your requirements.
>
> Regards
> > > Thanks,
> > > Ash
> > > http://www.ashleysheridan.co.uk
> > >
> > >
> > >
> > >
>
> --
> check out the rest of the Windows Live™. More than mail–Windows Live™ goes
> way beyond your inbox. More than 
> messages<http://www.microsoft.com/windows/windowslive/>
>


Re: [PHP] Best Practice to Create Dynamic URL's- With Username

2009-09-21 Thread Gaurav Kumar
A Big Thanks to all of you.

Question I was Asked by Andrea- "mod_reqrite or .htaccess is the answer, but
I wonder why you choose /user/username rather than just /username a la
twitter."

I will be using many other aspects of my users something like
"/projects/username/"; "/gallery/username/".

OK Ashley, Tommy and Ralph-

100% correct that mod_rewrite will be used.

I am a bit sticky that my URL will be-
"http://www.abcnetwork/user/*Ashley*<http://www.abcnetwork/user/username>".

So will I get $_GET["user"] with value as "*Ashley*" or *Tommy* in my
script?

<http://www.abcnetwork/userProfile.php?user=username>So what exactly will be
the ".htaccess" rule for above?


Thanks,

Gaurav Kumar
OSWebstudio.Com



On Mon, Sep 21, 2009 at 1:26 PM, Ashley Sheridan
wrote:

> On Mon, 2009-09-21 at 13:24 +0530, Gaurav Kumar wrote:
> > Hi All,
> >
> > I am creating a social networking website. I want that every user should
> > have there own profile page with a static URL like-
> >
> > http://www.abcnetwork/user/username
> >
> > Where username will be dynamic userid or something else.
> >
> > This is something very similar to www.youtube.com/user/kumargauravmail(this
> > is my profile page).
> >
> > So what should be the best practice to create such DYNAMIC URL's OR what
> > kind of methodology youtube is following?
> >
> > Thanks in Advance.
> >
> > Gaurav Kumar
> > OSWebstudio.com
>
> If you're working on an Apache server, your best bet is to look at
> mod_rewrite. You can write a simple rule to match against these sorts of
> URL formats, so that to your visitors it appears as if the actual path
> exists, but internally it can get translated to something like
> http://www.abcnetwork.com/profile.php?id=username
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>


[PHP] Best Practice to Create Dynamic URL's- With Username

2009-09-21 Thread Gaurav Kumar
Hi All,

I am creating a social networking website. I want that every user should
have there own profile page with a static URL like-

http://www.abcnetwork/user/username

Where username will be dynamic userid or something else.

This is something very similar to www.youtube.com/user/kumargauravmail (this
is my profile page).

So what should be the best practice to create such DYNAMIC URL's OR what
kind of methodology youtube is following?

Thanks in Advance.

Gaurav Kumar
OSWebstudio.com


Re: [PHP] best function to use ~ file_get_contents or ?

2009-09-15 Thread Gaurav Kumar
There is no best function as such. Everything depends upon your requirement.

You can also use fopen() to get the contents of the remote file and do some
error handling that if you get any content then display image else a message
etc..

Gaurav Kumar
(Team Lead- open source)
oswebstudio.com



On Wed, Sep 16, 2009 at 4:06 AM, CRM  wrote:

> Hi All,
> Not sure of the best approach, need your feedback. I have 4 images on a
> website. These are used in navigation. When I load a reference webpage on
> my
> local machine the local page calls 4 images from an external website, each
> image will be on a different domain.
>
> What I want to see is if the navigation images/buttons can be
> loaded/displayed
> in my browser. If they can, then I will display the images on my local
> page.
> If the images cannot be loaded, then this indicates some connection issue
> and
> the result will be some text like 'Site Offline'. So just by glancing at my
> local machine reference page I can tell if one or more of the different
> sites
> is or is not available.
>
> So what is the best function to use?
>
> if ( @file_get_contents( DOMAIN_PATH .
> "images/navigation/nav_globalissa.png" )):
>
> or ???
>
> Please also cc i...@globalissa.com
>
> Thanks for any helpful suggestions.
>
> Sincerely,
>
> Rob
> Global I.S. S.A.
> Software Powers the Net
> Email: crm at globalissa dot com
>
> * * * The Forge of Globalissa ~ PHP Foobar Machine * * *
> http://globalissa.com/forge/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


[PHP] php can do this

2007-05-12 Thread suresh kumar
Hi,
 I want to know whether its possible to implement this functionality in PHP 
and MySQL.. I will allow web users to download one .bat file from my 
Application.
   
 This .bat contains something like this  'c:\\program files\Internet 
Explorer\iexplore.exe' http://x.com/download.php";
   
 download.php file will contain images for downloading.
   
 when he execute this .bat file from his local machine.  I need to download 
some image files from the server to his local hard drive.i want to download 
automatically to this hard drive.
  
   (I don't want 'save as' dialog box where user can select the location to 
download.)
  
   In PHP code(server).Is there any way where i can tell the images to get 
download automatically to the local user desktop.
  
   I searched google.but i can't able to find any solution
   
 i am looking for some help from you guys.
   
A.suresh

  
-
 Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? 
Here's a solution! 

[PHP] Application support both chinese and english lang

2007-05-12 Thread suresh kumar
Hi,
   
  I am developing one application using PHP and MySQL.Right now my 
application supports English language.i like to integrate chinese language in 
my application.i like to implement similar to this website.
   
  http://www.dynasign.net.cn/dynasign/login.do
   
  'Language' combo box contain 'English' and 'chinese',when user select 
'English'.i like to display the page details  in english and when he select 
'chinese' i like to display page details in 'chinese'.
   
i set the  .but chinese font is not displaying.i think we need to do some 
PHP programatic unicode conversion.I dont know how to proceed .
   
 I am looking for some help from you guys.
   
A.suresh
   
   

   
-
 Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? 
Here's a solution! 

[PHP] unicode help

2007-05-08 Thread suresh kumar

Hi,
   
  Right now my application supports 'English' Language version,i like to 
integrate 'chinnese' language in my  application.My Application is running from 
 PHP and mysql.I don't have any idea regarding this unicode 
implementation.whether we can implement using javascript or PHP.I am looking 
forward some help from you
   

A.suresh

   
-
 Office firewalls, cyber cafes, college labs, don't allow you to download CHAT? 
Here's a solution! 

[PHP] Mysql_free_result() doubt

2006-09-26 Thread suresh kumar
Hi to all,
   I am little bit confused to use the mysql_free_result($result) 
function.because i searched google - they told dont use this function to php 
4.X and also it says clearly "When you are done with a result set, you must 
free the memory it uses by calling mysql_free_result()".
   
 I mean something like when  to use or not to use it? I already 
know that only SELECT  queries that  retrieve rows require to free resources, 
but maybe when all data is retrieved the resources are free automatically or we 
need to call mysql_free_result() to free the memory. and also this function 
will free only one row  at a time or all the rows of the  result set .
   

 A.suresh



-
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

[PHP] mail() help

2006-09-12 Thread suresh kumar
Hi,
  I  am using php mail function to send mails to our customers.but when i 
send mail to them.it is getting received in customers bulk folder .i want mail 
to get received in customers inbox.i dont know the reason why its getting 
stored in bulk folder.
   
   i attached the code.below,any one help me

  $to='[EMAIL PROTECTED]';

$subject='Password from MyAdTV';

$headers  = 'MIME-Version: 1.0' . "\r\n";

$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

$headers .= 'From: MyADTV @yahoo.co.in>' . "\r\n";

$headers.= 'X-Mailer: PHP/' . phpversion(). "\r\n";

$sendmessage = "Here is the information you requestedYour 
Logon name and Password details for MyADTV Account your LogonName is 
: suresh  your Password is  rajaysIf You Want To 
Login into Your MyADTV Account,http://myadtv.com/login.php\";>Click Here";
  
   
 mail($to,$subject,$sendmessage,$headers);
  

Christopher Weldon <[EMAIL PROTECTED]> wrote:
  -BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

suresh kumar wrote:
> Hi to all,
> i am having one doubt regarding php mail function.i am using php mail() 
> function to send mail to the users.but when i send mail throught php its 
> going to the users bulk folder but not to the user inbox.i dont know the 
> reason.
> 
> Is there any setting that is requried in the php.ini file (or) the user have 
> to change their setting in their mail (or) is there any option available to 
> send mail to the user inbox.tnxs for reply
> 
> A.suresh
> 
> 
> 
> 
> -
> Find out what India is talking about on - Yahoo! Answers India 
> Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
> NOW

There are several things you need to check for, and probably add to your
emails that you're sending.

Number one, add additional headers to make SPAM / Bulk filters realize
the message is not SPAM or should not be considered SPAM. IE:

$headers = "From: Suresh Kumar \r\n".
"X-Mailer: PHP 4.3.2\r\n".
"X-Sender: $_SERVER['HTTP_HOST']\r\n".
"X-Comment: If you can put a comment here, do it.\r\n";

mail($to, $subject, $body, $headers);

The above is considering you have already declared the $to, $subject,
and $body variables. Also, make sure your $subject is not
'undisclosed-recipients;' or something like that - it's a big no-no and
will definitely flag some SPAM filters. Put a valid e-mail address - but
you can still use the BCC-headers and everything should go just fine.
Alternatively, if your list is not too large, it looks better to run a
for / while loop to send each recipient a message directly (ie: not
using BCC) as that will cut down on the SPAM probability.

Second, if you are making MIME emails, make sure you are doing so
correctly. You can learn about creating multipart/alternative MIME
emails more at www.php.net/mail.

Finally, if none of the above works, it would be helpful for us to see
the headers of the received message from one of your recipients where
the message was put in the BULK folder.

- --
Christopher Weldon, ZCE
President & CEO
Cerberus Interactive, Inc.
[EMAIL PROTECTED]
979.739.5874
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBaG2Zxvk7JEXkbERAgZiAKCJVQfno2fAca13Sx7aXPWD2WMgUwCeOMBX
grbViYDnAXXy8l1i4liVHzE=
=ka5I
-END PGP SIGNATURE-

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

[PHP] mail() help

2006-09-11 Thread suresh kumar
Hi to all,
  i am having one doubt regarding php mail function.i am using php 
mail() function to send mail to the users.but when i send mail throught php its 
going to the users bulk folder but not to the  user inbox.i dont know the 
reason.
   
   Is there any setting that is requried in the php.ini file (or) the 
user have to change their setting in their mail (or) is there any option 
available to send mail to the user inbox.tnxs for reply
   
 A.suresh
   
  


-
 Find out what India is talking about on  - Yahoo! Answers India 
 Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it 
NOW

[PHP] doubt - session file size

2006-07-19 Thread suresh kumar
Hi,
 I am having one doubt,i am using session variable for storing details.but 
i am afraid if there is around 1 users,wherether session will be able to 
store all the  datas of 1 users,as i know  abt session is that a temporary 
file will be created in /tmp directory with session id name,i dont know how 
much data that the session file will handle.
   
A.suresh


-
 Find out what India is talking about on Yahoo! Answers India.
 Send FREE SMS from New Yahoo! Messenger to Mobile: Download NOW!

Re: [PHP] Software shopping cart

2006-07-10 Thread Ma Siva Kumar
On Mon July 10 2006 2:59 pm, Ryan A wrote:
> Hey all,
>
> While on the subject of shopping carts, (and i didnt
> want to hijack the other thread) can anybody recommend
> a shopping cart that sells ( or: to sell) software
> rather than material goods?
>
Hi Ryan

OS Commerce does all that you are asking for. 
http://www.oscommerce.com

It has options to set up various types of products/downloads and various 
payment options (paypal, credit cards etc). It is easy to install and use.

Best regards,

Ma Sivakumar

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] image upload problem

2006-06-29 Thread suresh kumar
Hi,
 This is the code i am using for image upload.
  if ($_FILES['ufile']['name'] != NULL)
 {

  $FlName= $_FILES['ufile']['name'];
  if(!is_uploaded_file($_FILES['ufile']['tmp_name'])){

 print "
alert(\"Error! The expected file wasn't loaded\");
   
";

exit();
  }
  
  $uploadfile = $_FILES['ufile']['tmp_name'];
  $uploadname = $_FILES['ufile']['name'];
  $uploadtype = $_FILES['ufile']['type'];
  $tempfile = fopen($uploadfile, 'rb');
  
  $filedata = addslashes(fread($tempfile,filesize($uploadfile)));
 $UpdateAdQuery = "update ". $thisAdTableName." set
   LocalImageName='" . $PostLocalCopy . "',
ImageData='" . $filedata . "',
ImageName='" . time() . "_".$uploadname ."',
mimetype ='" . $uploadtype . "'
where ID=" . $mID ;
  $ok = @mysql_query($UpdateAdQuery);
  }
   
  The Code is running properly.But I dont Know Where The uploaded image is 
Stored in the server.I checked "/tmp" directory,but image is  not there,is 
there any function where i can specify the location of the server where my 
image is to be stored i also tired move_uploaded_image() function .but its not 
working .I am waiting reply from any one


-
 Yahoo! India Answers: Share what you know. Learn something new Click here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here

[PHP] login problem

2006-06-23 Thread suresh kumar
Hi,
 I am facing one problem.i previously mailed ,but there is no response,its 
running out of time.i want to implement that logic as soon as possible.This is 
my problem
   
 We are developing an online software for  displaying ads in 
big mall.I want to restrict only one user can login to his own account at that 
particular time.suppose "users1" created a new user "users2" for another 
user.If "user1" login to the  "users2" account  and at that same time i want to 
restrict "user2 " for log in to his account.i want at a time only one user can 
access his account.I am waiting reponse from u
   
   A.suresh


-
 Yahoo! India Answers: Share what you know. Learn something new Click here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here

[PHP] User Login Problem

2006-06-20 Thread suresh kumar
Hi,
 I am facing one problem in my project.i want to restrict more than one 
user login in the same account .Is there any functions available to check r we 
can implement using session.

A.suresh


-
  Yahoo! India Answers: Share what you know. Learn something new Click here
 Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

[PHP] calling JS function from php

2006-05-24 Thread suresh kumar
I am facing one problem in my project.I am trying to call a javascript function 
from php.but it not executing.this is my code.
   
   function clientTime() {

var cNow = new Date();
var cHour = cNow.getHours();
   var cMin  = cNow.getMinutes();
   var hour= cHour + ":" + cMin;
   return hour;
   } //End function clientTime
  function clientDate() {
 var cDate  = new Date();
  var clientYear = cDate.getFullYear();
  var clientMonth = cDate.getMonth();
  var clientDay   = cDate.getDate();
  var year= clientYear + "-" + clientMonth + "-" + clientDay;
  return year;
} //End function clientDate
   
   
  ";
print "clientTime()";
print "clientDate()"; ?>
   
 i need help from u.


-
  Yahoo! India Answers Share what your know-how and wisdom
 Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

[PHP] file permission error

2006-05-22 Thread suresh kumar
Hi,
 I am facing one problem in my project.I am uploading an image .its get 
storing in DB.i am storing images in /tmp folder as file.while i am retrieving 
a image its displaying file permission error."fopen() could not open 
socket.file permission error".
 A.suresh


-
  Yahoo! India Answers Share what your know-how and wisdom
 Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

[PHP] IPN error

2006-04-29 Thread suresh kumar
Hi,
   I am new to this IPN (instant payment
notification.I am working for past 6 hours.I am using
this IPN to store payment details in our database.

when user clicks the paypal button in my page.it
will take to paypal.com website.after user completes
the payments.It will send the payment details to my
page.where i can process and store in the database.

This is the Code for paypal button:
---
 https://www.paypal.com/cgi-bin/webscr";
method="post">
 https://www.paypal.com/en_US/i/btn/x-click-but20.gif";
border="0" name="submit" alt="Make payments with
PayPal - it's fast, free and secure!" disabled>
 https://www.paypal.com/en_US/i/scr/pixel.gif";
width="1" height="1">
 http://myadtv.com/Gauranga/confirmation_message.php";>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 



my page code to  process paypal
--
 $value) {
  $value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}

// post back to PayPal system to validate
$header = "POST /cgi-bin/webscr HTTP/1.0\r\n";
$header .= "Content-Type:
application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: " . strlen($req) .
"\r\n\r\n";
$fp = fsockopen ('www.paypal.com', 80, $errno,
$errstr, 30);

// assign posted variables to local variables

$item_name = $_POST['item_name'];
$item_number=$_POST['item_number'];
$shipping_status = $_POST['no_shipping'];
$note_status = $_POST['no_note'];
$currency = $_POST['currency_code'];
$business_name = $_POST['bn'];
$payment_amount = $_POST['a3'];
$payment_duration_num = $_POST['p3'];
$payment_duration = $_POST['t3'];
$txn_id = $_POST['txn_id'];
//$receiver_email = $_POST['receiver_email'];
//$payer_email = $_POST['payer_email'];
$payment_status = $_POST['payment_status'];





if (!$fp)
{

 print "$errstr ($errno)\n";
}
else
{
include('db.php');
$transactionidretrieveresult=mysql_query("select
* from BillingInfo where Transaction_ID='$txn_id'");
 fputs ($fp, $header . $req);
   while (!feof($fp)) {
   $res = fgets ($fp, 1024);
 if (strcmp ($res, "VERIFIED") == 0) {
if(($payment_status=="Completed") and
(!mysql_num_rows($transactionidretrieveresult))):

   //storing in Database;
   

  endif;

  }
 elseif (strcmp ($res, "INVALID") == 0)
  {
print "Click The Link  To Go To MyADTV
Add New User Account PageClick Here";
  }
 
fclose ($fp);
}
?>


 When i visit my page i am displaying this error


 Undefined index:item_name,Undefined
index:item_number,Undefined index:a1,Undefined
index:p1,Undefined index:t1,Undefined index:a3,and so
on.


I am waiting response from any one


,



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] list noise [WAS: How to find tag and get src of image]

2006-04-24 Thread Ma Siva Kumar
On Mon April 24 2006 9:54 pm, Paul Novitski wrote:
> Rushed, grumpy defender of the underdog,
>
> Paul

>For those of you who are making a joke out of my question, glad to have 
>given you all a laugh.  I want to thank everyone else for being so nice and 
>helpful to beginners.

>Lisa


I am not an active participant in this list. But I learn a lot just reading 
the messages. I also read messages in pgsql-general@postgresql.org . There, 
even stupid, unresearched questions get serious answers with just gentle 
nudges. 

Just follow this thread. The question was:

Quote:
Subject: to know

Message:
hello guys,
what do u think about the near future of postgre?
what is the latest version of postgre? and how it differ from the oldone?
who is the leading person on postgre?
Unquote

http://archives.postgresql.org/pgsql-general/2006-04/msg01018.php

Have a look at the replies. A study in good manners.

Best regards,


Ma Sivakumar


-- 
Integrated Management Tools for leather industry
--
http://www.leatherlink.net

Ma Siva Kumar,
BSG LeatherLink (P) Ltd,
IT Solutions for Leather Industry,
Chennai - 600087
Tel : +91 44 55191757

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] array problem

2006-04-22 Thread suresh kumar
 sorry.earlier i mistyped some values. 
   
  I am facing one project in my project .
   
  this is my  code:
   
  a=array(0=>10,1=>10,2=>40,3=>30,4=>30,5=>10);
  b=array();
  b=array_unique($a);
  print_r($b); 
  o/p  getting from above code is  b[0]=10,b[2]=40,b[3]=30,b[5]=10;
   
  but i want the o/p be b[0]=10,b[1]=40,b[2]=30,b[3]=10;
   
  i searched php.net .i am not able to fine any solution.i am breaking 
my head for last  5 hours.i am waiting reply from any one
   



-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] unique array problem

2006-04-22 Thread suresh kumar
I am facing one project in my project .
   
  this is my  code:
   
  a=array(0=>10,1=>10,2=>20,3=>30,4=>30,5=>40);
  b=array();
  b=array_unique($a);
  print_r($b); 
  o/p  getting from above code is  b[0]=10,b[2]=20,b[3]=30,b[5]=40;
   
  but i want the o/p be b[0]=10,b[1]=20,b[2]=30,b[3]=40;
   
  i searched php.net .i am not able to fine any solution.i am breaking my head 
for last  5 hours.i am waiting reply from any one
   
   
   
   


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] unicode

2006-04-14 Thread suresh kumar
Hi to all,
  we completed one module of our project in English language.but 
our client asked to do it in chinesse language also.I dont have any idea 
regarding this.whether we have to download any  chinesse fonts or is there any 
tutorials available for this purpose.or project is in PHP 4  with linux 
platform.i am waiting for ur reply
   

 A.suresh  


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] page expire error

2006-03-27 Thread suresh kumar
Hai,
i am facing one problem in my project.I am using 2
pages for search operation.

   In Search page 1:
i am having 3 fields say Company
name,state,country. when user enters search key in
their corresponding field and press submit button.
search result will be displayed in  another page
"Search result page".when i click back button in
browser toolbar.it is displaying error message as

"The page you requested was created using information
you submitted in a form. This page is no longer
available. As a security precaution, Internet Explorer
does not automatically resubmit your information for
you" .

 I am storing the field name in session.



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] session_cache_expire()

2006-03-16 Thread suresh kumar
I searched php.net/session and weberdev website and
implemented session_cache_limiter() and
session_cache_expire() function.but i am not getting
the output what i want.i spend whole day on
searching.any one give the solution for my problem


in windows,if user idle for 1 minute,his desktop
screen is changed to screen saver.i like to implement
the same logic in my project if user is idle for 3
minutes its session will have to automatically 
destroy.i am waiting for or response.



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] to check idle time of users

2006-03-15 Thread suresh kumar
in windows,if user idle for 1 minute,his desktop
screen is changed to screen saver.i like to implement
the same logic in my project if user is idle for 3
minutes its session will have to automatically 
destroy.i am waiting for or response.



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] string to integer conversion

2006-03-15 Thread suresh kumar
i am facing one problem in type casting.
$accno="2927";
$accno=$accno+1;
its o/p is 2928. but i want output to be 2928.i am
waiting response from u.



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] session register()

2006-03-11 Thread suresh kumar
i am facing two problems in my project.
   
  1) whether i can store variable as session variable inside javascript function
   
  2)Is there any function available to calculate idle time of user .
   
   i am waiting for reply from u


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] session handling

2006-03-09 Thread suresh kumar
i am having one problem in session handling.
I am having 2 files,login page and hame page.
when user enterd user name and password in login page
.i used session to store the user id .in my second
home page.i retrieve the user id.now i want the user
id to be availble in my thrid page.plz help me.this is
my code.

login.php
session_start();
$ID=$userid;
session_register("ID");

homepage.php
session_start():
echo $ID   //this is working fine



thirdpage.php
  session_start();
  echo $ID //not working



i am looking reply from u

   



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] encrypt and decrypt in php

2006-03-07 Thread suresh kumar
I searched google,weberdev and php.net sites. i implemented the 2 encrypt and 
decrypt functions  mcrypt_encrypt(),mcrypt_decrypt() and mcrypt_ecb() 
functions.but it not working properly.i dont need more complicated encrypt and 
decrypt functionality.just i want to encrypt my user id when i pass from page1 
to page2 and i want to decrypt  it in page2.i am looking forward reply from u
   
 A.suresh


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] doubt regarding link

2006-02-25 Thread suresh kumar
i am having  back to home link ,by default its status is 0 in "mail table " 
database  .when any user click the  back to home link.i want to change status 
=1 in user table.is there any possible to call php function in javascript.i am 
using javascript onclick function.but javascript is not support to access DB.i 
am calling php function from javascript.but its not working.i am waiting for ur 
response.
   


-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] doubt in mail() in php

2006-02-13 Thread suresh kumar
this is my code

   if(@mail('[EMAIL PROTECTED]','subject','hai this is
the test','[EMAIL PROTECTED]')):
  print "mail sent succesfully";
   else:
print "mail can send";
endif;
  i dont know whether there is any problem
with my coding or server problem.both from and two
addresses are valid one.

   A.suresh






__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] doubt in mail function

2006-02-13 Thread suresh kumar
hello everybody,
i am having one doubt in  sending mail
in php.in my company our mail server is in windows,but
my php code for mail function in linux,i set the code
as

if(@mail('[EMAIL PROTECTED]','hi suresh','this is
test','From:[EMAIL PROTECTED]')):

both from and to address are valid  but mail
is not receiving to [EMAIL PROTECTED],

  whether i have 2 configure any settings in php.ini,i
am looking for reply from any one.
  A.suresh 




__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] static variables

2006-02-09 Thread suresh kumar
hai everbody

i am facing a problem with static
variable. i declared $count=0 as Static variable,when
i click the link specified in anchor tag my page is
refreshed again and static variable lose its value and
assigned with 0.i want the logic code say  my stsic
variable will not lose scope when i click next,i am
looking forward reply from u.
   A.suresh



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] static variable declaration

2006-02-09 Thread suresh kumar
hello everybody,

 I am having one doubt in static
variable declaration,whether static variable works
only with in the function if that function is  called
more than one times.this is my code facind problem.

 STATIC $m=0;
 if($m==0):
 
 $m=$m+1;
print "next"; 
  

 elseif($m<($k-1)):
   
 print "previousnext";

else:
 print "previous";

endif;


  u have seen yahoo mail inbox with Next ,previous
links in bottom. i want to implement same
functionality locally.i did my coding and i am facing
a problem, that  when i click the next link $m value
incremented to 1 for first time and when i click next
for second time ,$m value is not incrementing,i
declared $m as STATIC .i am looking forward
suggestions from ur any one.



 A.suresh





__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] global variable declaration

2006-02-08 Thread suresh kumar
hai,
   this is my sample code:
i am having user table  with SponsorID as one field in 
mysql  database,this is my query;
  
  for($j=0;$j<5;$j++):
   $result=mysql_query("select * from user where SponsorID='$id[$j]' ");
  endfor;
  
  in  above code when i   print  mysql_num_rows($result) inside for loop 
its output is  5.when i  print outside the for loop its o/p is 0.I searched 
weberdev.com website  and declared  $result as global.but same output 0.i want 
$result  variable to be  available outsibe the forloop and  all other  part of 
my code.i am looking forward suggestions from ur side.
  
   A.suresh
  
  
 
  

-
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[PHP] variables in PHP

2006-02-02 Thread suresh kumar
hi,
   In my project i assigned name of the text field as 
'loginform'.but i got error msg like 'Undefined
variable'
then i changed the name as 'hiddenfield' but same
error.any one having idea reply me.


  A.suresh



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] query regard forms in PHP

2006-01-29 Thread suresh kumar
 hai,
i am having 3 files,namely page1,page2  and page3,when i enter username 
and password in my first page i want 2  display  my username and password  in 
my third page through  second page.
  
 A.suresh
  


-
 Jiyo cricket on Yahoo! India cricket

[PHP] query regarding forms

2006-01-28 Thread suresh kumar
hi,
i am having 3 files  Login.php,home.php and
home1.php when i entered username and passwd in my
first login page i want want i entered as username and
passwd in my third page ie home1.php.

A.suresh  



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] doubt regarding while loop

2006-01-27 Thread suresh kumar
hi,
   for eg 
  
while(list(t1,t2,...)=mysql_fetch_row($result)):
endwhile;
 while i use $t1 ouside while loop ,its corresponding
value is not  displaying,how can i display the value
of $t1.

  A.suresh



__ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] help me pllzzzzzz

2006-01-18 Thread suresh kumar
hi,
   i am having 2 combo box one for city & another one
for country,when i select particular country say 
"india" their corresponding cities will be displayed
in city combobox as "delhi,bangalore.",when i
select  "Australia" thier cities like
"perth,brisbane"will be displayed.plz help me
itz very urgent.
   A.suresh

Send instant messages to your online friends http://in.messenger.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] help me plz

2006-01-18 Thread suresh kumar
hi,
   i am using 2 combo box one for country & another
one for city.when i select country name from combo box
their corresponding city names has to be changed in
their corresponding combo box.i dont know how 2
implement this.pz give me some idea.its urgent.
  A.suresh

Send instant messages to your online friends http://in.messenger.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how 2 open File Browser window in PHP

2006-01-16 Thread suresh kumar
hi,
 i dont know   exact  PHP code for how 2 open file browser window to uplad 
file or an image plz help me.its very urgent.
A.suresh

Send instant messages to your online friends http://in.messenger.yahoo.com 

[PHP] how 2 stroe images in Mysql Database using PHP

2006-01-16 Thread suresh kumar
Hi,
i dont know how 2 store images in gif/jpeg format
in Mysql Database.i also want 2 know PHP Code 2
store images in Mysql Database .reply me soon its very
urgent .
   A.suresh

Send instant messages to your online friends http://in.messenger.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] help plz

2006-01-15 Thread suresh kumar
hi,
   i am working as a web designer in PHP & Mysql.i
know the basics of PHP & Mysql,i want 2 become PHP
Expert,i am planning to buy one Book,but i dont know
which book 2 buy.plz give me info .
  A.suresh

Send instant messages to your online friends http://in.messenger.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP programmers from hyderabad

2005-12-18 Thread Vikram Kumar
hi!

We are looking for PHP programmers from hyderabd.

If you are an experienced PHP programmer, and have experience of developing
calendar or dairy , message board application, please send your CV to
[EMAIL PROTECTED]

All PHP programmers are welcome to apply!.

Best regards,
Vikram.


[PHP] PHP programmers from hyderabad

2005-12-17 Thread Vikram Kumar
hi!

We are looking for PHP programmers from hyderabd.

If you are an experienced PHP programmer, and have experience of developing
calendar or dairy , message board application, please send your CV to
[EMAIL PROTECTED]

All PHP programmers aare welcome to apply!.

Best regards,
Vikram.


[PHP] Transfer-Encoding: chunked problem

2005-12-10 Thread kumar kumar
Hi

i am sending  encrypted data(AES-CBC) every large
files to the php pages as streams, in php i am
decrypting the data .

The code is working fine for the filesize less than
12MB each (if 30files each of 12 Mb total = 360 Mb)
its working file .

If i am trying to upload a file greater than 15 mb the
upload is hanging at 13.43Mb 

And after some time i am getting following msg
 
Server: Apache/2.0.53 (Win32) PHP/5.0.3
X-Powered-By: PHP/5.0.3
Transfer-Encoding: chunked
Content-Type: text/html; charset=ISO-8859-1

‚ìD0Ρ)›ÝT5 ‚ìD0Ρ)›ÝT5 and junk values


If any body have idea, what's the problem pls help me

WithRegards
Kumar




 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Web calendar and online Dairy

2005-12-06 Thread Vikram Kumar
Hi!

I need a web calendar and online diary application.

Can some one develop those applications for me.

You may use open source applications, or already developed applications in
your previous projects, I need simplest calendar and online diary
applications.

And ofcourse, I will pay you.

thank you!

Vikram!


[PHP] Query about gzinflate

2005-11-15 Thread kumar kumar
HI

How to uncompress  compressed data with php://input 

Which one of the following is correct 

1 .$unzip = gzinflate("php://input","r");
$getdata =  fopen($unzip."r");

2. gzcompress("php://input","r");

  $getdata =  fopen($unzip."r");
 
what the best solution help me

With regards
Praveen


 





__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Error in reading and writing bytes

2005-11-09 Thread kumar kumar
Hi
i am new to PHP .I am facing some problems .
Here is the code below

Here the applet will send the files thru http . files
from 30 bytes   to 2 GB.

$val) {
   $default=$default.$val;
  
   if(!file_exists($default))
   if (!mkdir($default,$dirmode)) {
   return -1;
   }
   }
   }else if (!is_dir($dir)){
   return -2;
 }
   }
   return 0;
   }


  $fp = fopen($fname,"w");

  $getdata = fopen("php://input", "r");

  fwrite($log, "$fname Uploaded Successfully \r\n");


while (strlen($data = fread($getdata,8192)) > 0) {
fwrite($fp,$data);  
}

fclose($fp);
fclose($getdata);
fclose($log);
?>

I tried this one its working for bigger files , but
its not working for small files less than 7 MB i am
unable to track the error or reason.and some times its
writing the less amount of bytes(60MB) then the
original one(90MB).

If possible please go thru this code and suggest me
the changes.

Thanking you
With Regards
Kumar



 





__ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Error in reading and writing bytes

2005-11-09 Thread kumar kumar
Hi
i am new to PHP .I am facing some problems .
Here is the code below

Here the applet will send the files thru http . files
from 30 bytes   to 2 GB.

$val) {
   $default=$default.$val;
  
   if(!file_exists($default))
   if (!mkdir($default,$dirmode)) {
   return -1;
   }
   }
   }else if (!is_dir($dir)){
   return -2;
 }
   }
   return 0;
   }


  $fp = fopen($fname,"w");

  $getdata = fopen("php://input", "r");

  fwrite($log, "$fname Uploaded Successfully \r\n");


while (strlen($data = fread($getdata,8192)) > 0) {
fwrite($fp,$data);  
}

fclose($fp);
fclose($getdata);
fclose($log);
?>

I tried this one its working for bigger files , but
its not working for small files less than 7 MB i am
unable to track the error or reason.and some times its
writing the less amount of bytes(60MB) then the
original one(90MB).

If possible please go thru this code and suggest me
the changes.

Thanking you
With Regards
Kumar



 






__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] How to read Byte Stream

2005-11-05 Thread kumar kumar
Hi

I am Software Engineer in hyderabad . if possible i
need some help in PHP.
 
we are developing one applet that will upload the
files/folders upto 2gb . the applet will send the file
in bytes stream via http . At server side the PHP has
to receive the file bytes stream and as to write the
file in server system . with the file path preserve .
 
 
i tried this code to get some idea
  
$request  =  new
Java("javax.ServletRequest",$req);
$request -> getInputStream();
  
  $in =  $new
Java("javax.servlet.ServletInputStream",$in);
$byte[] =  new Java("java.lang.byte",$line);

$bytes = 0;
   
new Java("java.io.FileOutputStream", $fileOutS)
   
$fileOutS = new Java(
FileOutputStream($dir$file));
 while(0 <($bytes = in ->read($line))){

 $fileOutS->write($line,0, $bytes);
 }
its not working . and the requirment is also not to
use java extension . i have to develop it with out
java extension .
your Help is appreciated Greatly
 
Thanking you
With Regards
Praveen

 






__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: about PHP

2005-09-19 Thread Srinivasan Kumar
sir,
 this is srinivasan i have to know about the php.i.e.
 how can i view the php pages in windows98 PWS?.could
 you reply in this regard.
 thanking you
 k.srinivasan


Gabor Hojtsy <[EMAIL PROTECTED]> wrote:Dear Srinivasan Kumar,

Since your problem has nothing to do with
webmastering of the php.net website, it does
not belong in here Please contact
php-general@lists.php.net (a mailing list)
with support questions or see http://php.net/support
for more support options.

Regards,
Gabor Hojtsy

Srinivasan Kumar wrote:
> sir,
> this is srinivasan i have to know about the php.i.e.
> how can i view the php pages in windows98 PWS?.could
> you reply in this regard.
> thanking you
> k.srinivasan
> 
> 
> 
> __ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 




-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

RE: [PHP] From Poland

2005-01-09 Thread Manoj Kumar
What the mean to spend time  of a group for this type of off topics. 


--mksheoran


-Original Message-
From: Ewa Rubach Wardawy [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 08, 2005 11:59 PM
To: php-general@lists.php.net
Subject: [PHP] From Poland 

Dear Greg! 

This is Jarek.Wardawy. It's not a joke I promisse! This is my real name.
Some time ago I found your name in internet I wrote an e-mail to you. No
answer. Maybe this time.

I' m from Poland, living in a city Ostrow Wielkopolski. I'm working as a
journalist, and that's the reason why I spend so much time in internet. 

I'm oopen minded person, 40 years old. I'll be happy o write you more about
me and my family. At least, we have the family name. I'm interested of your
background, probably it comes from Poland. Is interesting for you? If so,
write me back, also for [EMAIL PROTECTED]  Just put the name wardawy in
google, and you'll see, that it's not a stupid joke. 

 

Best regards

Jarek Wardawy 

>From Poland 

 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] How to process a query form with CHECKBOX Please help

2004-12-27 Thread S Kumar
Dear group, 
 I am a novice programmer started doing php to process
a query form of my patients.  

I have a database and one table in it deals with my
patient information.  Depending on their condition I
divided their age groups into 3 categories. In my
database a table patient_data has a column age_group
and a patient can be any one of young, middle or old
category.   
Now the possibility is that a user can selecct 1 or 2
or all three options.

In the query form, I gave the option for a user as a
check box. The piece of html code is as below:

Age group
Young
Middle
Old

Problem:
I want to capture the user options and create an SQL
statement:

Select age_group from patient_data where age_group =
young and old ; 


I am truly stuck here. Can any one please help me out
to pass this situation. 

Thank you in advance.

Kumar. 




__ 
Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we. 
http://promotions.yahoo.com/new_mail

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [PHP-DB] what is wrong with my code.. please help

2004-12-26 Thread S Kumar


Dear group, 
 I am trying to query my db and print the results. 

 when i execute my script, i am not getting any
result
 except a blank page. can any one please help me what
 is going wrong with my script. 
 
 Script:
 
 $conn = pg_connect("user = $user dbname = $dbname
 host
 = $host password = $pass");
 if (!$conn)
 {
 echo('could not establish connection with
 database ');
 exit;
 }
 $sql = "select * from experiment;"
 $sth = pg_exec($connect,$sql)
 if (! $sth){
 die("Can't execute query".pg_errormessage());
 }
 
 for($i = 0,$j = pg_numrows($sth);$i < $j;$i++){
 $ar = pg_fetch_row($sth,$i);
 foreach($ar as $col){
 print "$col ";
 }
 print "\n";
 }
 
 ?>
 
 thank you in advance

 kumar




__ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Any one have idea about plankton/

2004-12-03 Thread Pravin-Kumar
hey! 
There a framework for php known as plankton..
http://sourceforge.net/projects/plankton/
is there any have idea..how to configure..because i haev tried but not 
working.. and also tell me is it usefull or not?

--
pravin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Mysql Connect Help

2004-11-21 Thread Manoj Kumar
 

 You should enable php_mysql module in your php.ini file.

-- Manoj Kr. Sheoran  

-Original Message-
From: Nathan Mealey [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 21, 2004 10:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Mysql Connect Help

A seemingly simple problem, still confounding me.

The following line of code:
mysql_connect('database','user','password'); [with values of course]

Generates the following error:
Fatal error: Call to undefined function: mysql_connect() in
/var/www/html/phptest.php on line 3

My PHP info page says that PHP (4.3) was compiled with MySQL, and
extensions_dir is correct (although the extensions_dir itself is empty, but
I don't know if this matters).  So PHP itself is working.

I installed MySQL 4.1 from RPM (client and server RPMs) on Redhat 8.0 this
morning.

Thanks for any help,
Nathan
--
Nathan Mealey
Director of Operations
Cycle-Smart, Inc.
P.O. Box 1482
Northampton, MA
01061-1482
[EMAIL PROTECTED]
(413) 587-3133
(413) 210-7984 Mobile
(512) 681-7043 Fax

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] ANN: MySQLDiff 0.1, program to output diffs between MySQL tables

2004-11-20 Thread Rajesh Kumar
Hello PHP Community,
MySQLDiff is a PHP5 command-line utility that prints SQL statements to
sync two MySQL databases or tables.
This program works just like the original MySQLDiff
(http://www.mysqldiff.org/), but is much faster and is useful for
quickly comparing two databases.
The source code may be obtained from a public Subversion repository, and
tested as shown:
  $ svn co http://www.svnhosting.org:8000/svn/mysqldiff/trunk mysqldiff
  $ cd mysqldiff
  $ sudo make install
.. installs to /usr/local/bin/mysqldiff
  $ mysqldiff db1 db2
  $ mysqldiff --paranoid db1.tbl db2.tbl
	
MySQLdiff is still alpha and requires heavy testing and
improvements. All required PEAR packages are packaged with MySQLDiff. 
Copyrights may have been violated with regards to PEAR::Text_Diff. If 
so, I'm prepared to take necessary action.

Please contact me (off-list) if you're interested in becoming a 
developer. Please send patches against the HEAD revision by executing 
`svn up && svn diff'

Bug reports, feature suggestions and help requests welcome.
--
Rajesh Kumar
MySQLDiff Maintainer
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Warning: Unknown list entry type in request shutdown (0) in Unknown on line 0

2004-11-20 Thread Manoj Kumar
Hi folks , 
 
 What is the case of following warning ...
 Warning: Unknown list entry type in request shutdown (0) in Unknown on
line 0   
 
 
-- Manoj Kr. Sheoran 
  www.daffodildb.com http://www.daffodildb.com> 
 
 
 


[PHP] ERP - CRM implemented in PHP

2004-11-19 Thread Manoj Kumar
Hi   folks,  
  Would you please suggest me the name of ERP - CRM software solely
implemented in PHP . 
 
-- Manoj Kr. Sheoran 


[PHP] LINUX: Problem with php installation

2004-11-10 Thread abhilash kumar
I installed latest version of PHP from the source on a
AMD ATHELON64 system with REDHAT 9.0 installed with
apache server 2. There were no error upon running
"configure" or "make" or "make install" I have checked
the instalation procedures many times now but I get a
blank screen on the mozilla browser.

Upon viewing the source it shows the source of a blank
html page. The server works well with html pages. Only
the problem is with any php page. I have made the
mentioned additions to be done in the httpd.conf file
namely LoadModule and AddType.

The error log file is showing "Segmentation fault".



___ 
Moving house? Beach bar in Thailand? New Wardrobe? Win 10k with Yahoo! Mail to 
make your dream a reality. 
Get Yahoo! Mail http://uk.mail.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re. [PHP] mysql networking ?

2004-11-08 Thread Manoj Kumar
Hi its a php mailing list ? Okey .

-- Manoj Kr. Sheoran 


"Aalee" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi guys,
> I have a small home network working with just 4 computers (PC's on WinXP
> Pro) connected through a switch just using the local ip's 192.168.0.1 and so
> on. And the netwok is working fine. I have installed MySQL on one computer
> and setup a database and installed MySQL on the other PCs aswell. But am
> having problem getting into the server computer where the databases are
> setup. Does any one of you know of any good tutorials out there how to setup
> a small network using MySQL using windows XP. I have come across some tutes,
> but most of them are on using Linux. Or any advice would be helpful.
> 
> Thanks on advance
> aalee
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Completing dream of connect with Java RDBMS with php

2004-09-04 Thread Manoj Kumar
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module 
will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what 
is procedure to include a new module in php source(php cvs ) , so it will available 
free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Good news for each develper

2004-09-04 Thread Manoj Kumar
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module 
will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what 
is procedure to include a new module in php source(php cvs ) , so it will available 
free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Goosebump ? ? New feature / implementaion in PHP

2004-09-04 Thread Manoj Kumar
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module 
will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what 
is procedure to include a new module in php source(php cvs ) , so it will available 
free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Hi friends Plz give suggestion ..

2004-09-04 Thread Manoj Kumar
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module 
will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what 
is procedure to include a new module in php source(php cvs ) , so it will available 
free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] New module Entry issue ..

2004-09-04 Thread Manoj Kumar
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module 
will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what 
is procedure to include a new module in php source(php cvs ) , so it will available 
free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Support issue ...

2004-09-04 Thread Manoj Kumar
hi dear developers, 
 
   We developed a module in (php_home/ext/) with name daffodildb , This module 
will provide connectivity to DaffodilDB (A Pure Java RDBMS) . But I don't know , what 
is procedure to include a new module in php source(php cvs ) , so it will available 
free to developers with php source. Can anybody suggest me. 

Reagards, 
Manoj Kr. Sheoran 
Software Engg. 
SCO-42 ,3rd Floor
OJC, Civil Lines 
Gurgoan (HARYANA)
INDIA
mailto: [EMAIL PROTECTED]
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Would you help me ?

2004-09-04 Thread Manoj Kumar
hi developers, 

 Could anybody tell me How to include a datbase extention module in hp
source , so that will be available with php source. What is procedure to include
it on php source ..It's very urget , plz suggest me..

Reagards, 
Manoj Kr. Sheoran 
www.daffodildb.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   3   >