DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Loïc Hoguin's picture

Unregistered

Feeds

aliases

  • Loïc Hoguin

Loïc Hoguin

1 year ago

in Cross-Domain AJAX calls using PHP | Md Emran Hasan (phpfour) on Md Emran Hasan (phpfour)
Indeed, filtering using REMOTE_ADDR is the best if both servers are yours.

What's important to note, too, is that if curl_exec can't fetch the data for some reasons it will return false. That means that your script will echo nothing. People using it should take care on the javascript side to check the data they get and if it's empty display an error.

1 year ago

in Cross-Domain AJAX calls using PHP on Md Emran Hasan (phpfour)
Indeed, filtering using REMOTE_ADDR is the best if both servers are yours.

What's important to note, too, is that if curl_exec can't fetch the data for some reasons it will return false. That means that your script will echo nothing. People using it should take care on the javascript side to check the data they get and if it's empty display an error.

1 year ago

in Cross-Domain AJAX calls using PHP | Md Emran Hasan (phpfour) on Md Emran Hasan (phpfour)
Please please please add some caching mechanism to your script. You do not want to allow some kiddie to flood another website using your script. Even 1-minute cache is enough, but just don't call this website everytime like this. Not only will it be slow but the other site owner might get angry at you.

1 year ago

in Cross-Domain AJAX calls using PHP on Md Emran Hasan (phpfour)
Please please please add some caching mechanism to your script. You do not want to allow some kiddie to flood another website using your script. Even 1-minute cache is enough, but just don't call this website everytime like this. Not only will it be slow but the other site owner might get angry at you.
Returning? Login