[PHP] Re: [PHP-WIN] 5.3.9RC2 and 5.4RC2

2011-11-28 Thread Pierre Joye
On Mon, Nov 28, 2011 at 5:51 AM, Tommy Pham  wrote:

> Can someone please confirm if you're able to create/drop MySQL
> database on using phpMyAdmin with PHP 5.3.9RC2 or PHP5.4RC2?

Please use the sqlsrv or mysql functions directly with CREATE/DROP
queries in a little script, it will be easier to debug.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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




Re: [PHP] PHP exercises

2011-11-28 Thread shiplu
Here is a good place for logic building.
http://projecteuler.net/

-- 
Shiplu Mokadd.im

Innovation distinguishes between follower and leader


[PHP] curl ,response headers and gzip encoding

2011-11-28 Thread Tontonq Tontonq
hi i am trying to build a proxy server for opera's turbo mod

 $value) {
$data.= "\n$name: $value";
}
$data=str_replace('Host: w.com','Host: '.$domainadi,$data);
$data.="\r\n\r\n";
if($_SERVER['REQUEST_METHOD']=='POST') {
$data.=@file_get_contents('php://input'); }


#echo $domain;exit;
#echo $data;exit;



$ch = curl_init($domain);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if($_SERVER['REQUEST_METHOD']=='POST') { curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, @file_get_contents('php://input')); }
$header = array();
foreach(getallheaders() as $key => $value)
{
if(strtolower($key)!='host')
{
$header[] = $key . ':' . $value;
}
}
curl_setopt($ch , CURLOPT_HTTPHEADER , $header);
$donen=@curl_exec($ch);

#header('Content-Encoding: gzip');
if(curl_getinfo($ch,CURLINFO_HTTP_CODE)=='0') die('Hata Kod:36');
@list($reshead, $body) = @explode("\r\n\r\n", $donen, 2) or die('Hata Kod
:37');

$info = curl_getinfo($ch);
$reshead = substr($donen, 0, $info['header_size']);
$body = substr($donen, $info['header_size']);


$headerlar=explode("\n",$reshead);
for($i=0;$i


it returns the gzip content as damaged may be for split the headers and
body ,
,
when i take   curl_setopt($ch, CURLOPT_HEADER, 0); to   curl_setopt($ch,
CURLOPT_HEADER, 1);
  header('Content-Encoding: gzip'); uncomment this line
hide these lines

/*
if(curl_getinfo($ch,CURLINFO_HTTP_CODE)=='0') die('Hata Kod:36');
@list($reshead, $body) = @explode("\r\n\r\n", $donen, 2) or die('Hata Kod
:37');

$info = curl_getinfo($ch);
$reshead = substr($donen, 0, $info['header_size']);
$body = substr($donen, $info['header_size']);


$headerlar=explode("\n",$reshead);
for($i=0;$i

Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-28 Thread David McGlone
On Sun, 2011-11-27 at 22:20 -0500, Paul M Foster wrote:
> On Sun, Nov 27, 2011 at 06:47:36PM -0500, David McGlone wrote:
> 
> > Hi all, I am wondering if it's possible to find the bookmarks file in
> > firefox and output the contents on a page with PHP.. I'm wanting to do
> > this so I can use it as my home page.
> 
> The answer to this is not in PHP; it can be done in Firefox by itself.
> It's been a long time since I set this up, but if I'm not mistaken, the
> procedure goes like this:
> 
> 1. In Firefox, enter about:config in the URL bar. (Ignore warnings.)
> 2. You are now in the raw configs. Search for a key called
> browser.bookmarks.autoExportHTML. Set this to 2. This should cause
> Firefox to dump the contents of it places.sqlite file to a file called
> bookmarks.html when Firefox is closed.
> 3. Find another key called browser.startup.homepage. Set this to the
> absolute path of a file called bookmarks.html in your Firefox file tree.
> The path will be something like (in Linux):
> /home//.mozilla/firefox/.default/bookmarks.html.
> (Obviously, you'll have to locate this file ahead of time.)
> 
> If this isn't the exact procedure, it's close. You can dig into the
> Firefox docs to get the exact values or keys if these aren't right. (For
> example, I don't know why the first key I mentioned is 2 instead of 1.)
> 
> Anyway, I have my Firefox set up this way.

Hi Paul. The drawback I have found so far with this setup is that the
page will not update until firefox is restarted. do you have a
workaround for this?

-- 
Thanks,
David M.


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



[PHP] snippets google plus with wordpress

2011-11-28 Thread ml

Hello list
hello php
hello bearded

I just finished partially implement the google snippets about wordpress

I say partially
Indeed j arrives to recover as the author and date
No I can not seem to recover to recover the image and description of 
the subject


Here is the code that uses the j page themes index.php page.php 
single.php


 http://schema.org/Article";>
  
   


I get the title the author el date

how to properly run the snippets
I thank you for your help our

--
 http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7
 gpg --keyserver pgp.mit.edu --recv-key 092164A7

 http://urlshort.eu fakessh @
 http://gplus.to/fakessh
 http://gplus.to/john.swilting

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



Re: [PHP] snippets google plus with wordpress

2011-11-28 Thread Ashley Sheridan
On Mon, 2011-11-28 at 21:32 +0100, ml wrote:

> Hello list
> hello php
> hello bearded
> 
> I just finished partially implement the google snippets about wordpress
> 
> I say partially
> Indeed j arrives to recover as the author and date
> No I can not seem to recover to recover the image and description of 
> the subject
> 
> Here is the code that uses the j page themes index.php page.php 
> single.php
> 
>   http://schema.org/Article";>
>
> the_author\
> (); ?> 
>  
> 
> I get the title the author el date
> 
> how to properly run the snippets
> I thank you for your help our
> 
> -- 
>  http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x092164A7
>  gpg --keyserver pgp.mit.edu --recv-key 092164A7
> 
>  http://urlshort.eu fakessh @
>   http://gplus.to/fakessh
>   http://gplus.to/john.swilting
> 



I think for questions specific to Wordpress you really ought to ask on a
Wordpress list/forum. This one is for general questions about PHP, not
really the best place to ask specifics about a particular CMS. There's a
list of the forums available at http://wordpress.org/support/ 

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] PHPExcel

2011-11-28 Thread Floyd Resler
Does anyone have much experience with PHPExcel?  I'm having difficulties in 
getting multiple sheet workbooks to work properly.  I haven't been able to find 
any practical examples.

Thanks!
Floyd


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



[PHP] PHP run from console - automatic password input

2011-11-28 Thread asdf zxcv
I'm trying to make my php script (run from console) to input nesesary data
when console asks for it.

For example, i want to automatically manage revoking self-signed
certificates, but when i exec("command") then system asks me to give the
pass phrase. I dont want to do that. Instead, I want my script to input the
password automatically.

Is there any way to achieve that?

Regards
Peter


Re: [PHP] Finding and reading firefox bookmarks with PHP

2011-11-28 Thread Paul M Foster
On Mon, Nov 28, 2011 at 10:59:03AM -0500, David McGlone wrote:

> On Sun, 2011-11-27 at 22:20 -0500, Paul M Foster wrote:
> > On Sun, Nov 27, 2011 at 06:47:36PM -0500, David McGlone wrote:
> > 
> > > Hi all, I am wondering if it's possible to find the bookmarks file in
> > > firefox and output the contents on a page with PHP.. I'm wanting to do
> > > this so I can use it as my home page.
> > 
> > The answer to this is not in PHP; it can be done in Firefox by itself.
> > It's been a long time since I set this up, but if I'm not mistaken, the
> > procedure goes like this:
> > 
> > 1. In Firefox, enter about:config in the URL bar. (Ignore warnings.)
> > 2. You are now in the raw configs. Search for a key called
> > browser.bookmarks.autoExportHTML. Set this to 2. This should cause
> > Firefox to dump the contents of it places.sqlite file to a file called
> > bookmarks.html when Firefox is closed.
> > 3. Find another key called browser.startup.homepage. Set this to the
> > absolute path of a file called bookmarks.html in your Firefox file tree.
> > The path will be something like (in Linux):
> > /home//.mozilla/firefox/.default/bookmarks.html.
> > (Obviously, you'll have to locate this file ahead of time.)
> > 
> > If this isn't the exact procedure, it's close. You can dig into the
> > Firefox docs to get the exact values or keys if these aren't right. (For
> > example, I don't know why the first key I mentioned is 2 instead of 1.)
> > 
> > Anyway, I have my Firefox set up this way.
> 
> Hi Paul. The drawback I have found so far with this setup is that the
> page will not update until firefox is restarted. do you have a
> workaround for this?

Yeah, that's the rub. When I found the instructions for doing this, they
were clear that Firefox wouldn't update the file until the browser was
closed. Outside of that, you'd just have to read the actual SQLite file,
I suppose.

Paul

-- 
Paul M. Foster
http://noferblatz.com
http://quillandmouse.com

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



Re: [PHP] PHP run from console - automatic password input

2011-11-28 Thread shiplu
On Tue, Nov 29, 2011 at 8:21 AM, asdf zxcv  wrote:

> I'm trying to make my php script (run from console) to input nesesary data
> when console asks for it.
>
> For example, i want to automatically manage revoking self-signed
> certificates, but when i exec("command") then system asks me to give the
> pass phrase. I dont want to do that. Instead, I want my script to input the
> password automatically.
>
> Is there any way to achieve that?
>
> Regards
> Peter
>


You could try,

$pass = "1285@";
exec("echo $pass | command");

But if its a privilege issue on your linux system, its better to start the
php script with proper privilege.

-- 
Shiplu Mokadd.im

Innovation distinguishes between follower and leader