开发者

How can I send a date from one site to other sites?

开发者 https://www.devze.com 2023-01-01 02:39 出处:网络
I\'m not much of a php coder, mainly use VB. But I had a problem with one of my apps. To make it more secure I would need each php parameter to go through one site. Here is an example of what I mean:

I'm not much of a php coder, mainly use VB. But I had a problem with one of my apps. To make it more secure I would need each php parameter to go through one site. Here is an example of what I mean:

The problem so far is that the PC is making direct connections to these pages. What I was trying to do is make it so that it only sends one command to z.php and the page z.php would send the data to a.php and b.php.

My question is: How would I set up z.php?

I hope this makes sense; I have looked everywhere and couldn't find an answer.


You can have z.php make a GET request to a.php and b.php, passing the required parameters in the querystring.

i.e. a.php?parama=valuea&paramb=valueb

You can then grab these from $_GET in a.php and b.php

Is this what you are trying to do?


This cab be achieve using cURL function in PHP...see the below references..

http://php.net/manual/en/book.curl.php
http://www.askapache.com/htaccess/sending-post-form-data-with-php-curl.html


You'll have to write your z.php file to perform connection to a.php and b.php. You can retreive IP and location though $GET variable, an example would be :

  • You call z.php?ip=xxx.xxx.xxx.xxx&location=yyyy
  • z.php makes an HTTP request (you can use cURL for that)
  • z.php waits for the response and send it back to your original script.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号