note 101953 added to book.curl

From: Date: Wed, 19 Jan 2011 22:55:50 +0000
Subject: note 101953 added to book.curl
Groups: php.notes 
Request: Send a blank email to php-notes+get-175916@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://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); ?> ---- Server IP: 69.147.83.197 Probable Submitter: 182.1.93.9 ---- Manual Page -- http://www.php.net/manual/en/book.curl.php Edit -- https://master.php.net/note/edit/101953 Del: integrated -- https://master.php.net/note/delete/101953/integrated Del: useless -- https://master.php.net/note/delete/101953/useless Del: bad code -- https://master.php.net/note/delete/101953/bad+code Del: spam -- https://master.php.net/note/delete/101953/spam Del: non-english -- https://master.php.net/note/delete/101953/non-english Del: in docs -- https://master.php.net/note/delete/101953/in+docs Del: other reasons-- https://master.php.net/note/delete/101953 Reject -- https://master.php.net/note/reject/101953 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#175916) next »