note 101953 modified in book.curl by danbrown

From: Date: Wed, 19 Jan 2011 23:08:08 +0000
Subject: note 101953 modified in book.curl by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-175918@lists.php.net to get a copy of this message
This anomali only happen on windows. Server indicates that some variables built by http_build_query() is missing. <?php //... //... //... $ping_url = $this->sx_url.'ping.php?'.http_build_query($options); $message = $this->_post_curl($ping_url); ?> After debugging i found that $ping_url contain url like : http://example.com/ping.php?app=1&amp;key=mail&amp;ttd=df52861e But myserver give "No ttd GET variable" response This problem fixed by adding optional parameter to make sure that http_build_query() use only '&' as arg separator rather than '&amp;' <?php //... //... //... $ping_url = $this->sx_url.'ping.php?'.http_build_query($options,'','&'); $message = $this->_post_curl($ping_url); ?> --was-- This anomali only happen on windows. Server indicates that some variables built by http_build_query() is missing. <?php ... ... ... $ping_url = $this->sx_url.'ping.php?'.http_build_query($options); $message = $this->_post_curl($ping_url); ?> After debugging i found that $ping_url contain url like : http://myserver.com/ping.php?app=1&amp;key=mail&amp;ttd=df52861e But myserver give "No ttd GET variable" response This problem fixed by adding optional parameter to make sure that http_build_query() use only '&' as arg separator rather than '&amp;' <?php ... ... ... $ping_url = $this->sx_url.'ping.php?'.http_build_query($options,'','&'); $message = $this->_post_curl($ping_url); ?> http://php.net/manual/en/book.curl.php

« previous php.notes (#175918) next »