简体   繁体   中英

asking question about using curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);

I studied yahoo app login page by curls that user can check his/her user and pass

in this line:

$postData = "login=$login&passwd=$password&.src=&.tries=5&.bypass=
&.partner=&.md5=&.hash=&.intl=us&.tries=1&.challenge=ydKtXwwZarNeRMeAufKa56.oJqaO
&.u=dmvmk8p231bpr&.yplus=&.emailCode=&pkg=&stepid=
&.ev=&hasMsgr=0&.v=0&.chkP=N&.last=&.done=" . $serviceUrl; 

by using curl can some one explain these ampersand and dots? why they are used here? I know about hashing and MD5 but I don't know about these dots and....

curl_setopt($ch, CURLOPT_POSTFIELDS, $postData); 

& is fairly fundamental syntax for connecting different parameters together in http requests. The "." seems to be just variable 'style' that yahoo uses. Nothing special about it all.

It could also be the case that the PHP code that was used to create that was messed up, parsed wrong and the dots shouldn't be there in the first place.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM