Hello,
I have a question about content filtering using cURL. Now that i can make get requests with cURL is it possible to make POST request and filter the page request?
viewtopic.php?f=1&t=144061
For example, a user visits my url and it will automatically login to a site and content filtering will remove the username, user control panel and the ability to make posts. Just giving access to read the site like a web proxy.
Thanks
Filter content with cURL
Moderator: General Moderators
Re: Filter content with cURL
Yes, it's possible. You can make POST requests and the response is just a big string so you can do with it what you want.
But this idea of yours sounds hella sketchy.
But this idea of yours sounds hella sketchy.
Re: Filter content with cURL
The idea is for a site that is blocked and i want to setup a php script in a web server using cURL to access it. The POST is a feature to the script to automate things. First i was thinking on modifying Glype but i got lost in the code.
Can you help me out on:
1) help docs for the POST request in cURL
2) setup a filter for the cURL string
Thanks
Can you help me out on:
1) help docs for the POST request in cURL
2) setup a filter for the cURL string
Thanks
Re: Filter content with cURL
Maybe. Why and how is it blocked?
Re: Filter content with cURL
As you may already know i live in Portugal and there is some sites that are blocked by dns (for example TPB). I can change the dns to 8.8.8.8 and 8.8.4.4 but i have to do this in any device so i think that is better to just to take advantage of cURL (because i'm starting exploring it) and upload the file to a server.
Re: Filter content with cURL
I don't think we can really help you circumvent legal blocking, even if I do disagree with it.
But I can tell you that cURL will resolve hostnames mostly according to system settings, and that the CURLOPT_RESOLVE option lets you give a custom IP address for a hostname.
But I can tell you that cURL will resolve hostnames mostly according to system settings, and that the CURLOPT_RESOLVE option lets you give a custom IP address for a hostname.
Re: Filter content with cURL
This is one example that i want to use the code for. I may expand to other projects when i fully understand how can i filter the cURL result string. Another project will be to login to a site with a different credentials and location since the IP provided to the end site is the server IP.
If possible provide with examples to work with. I have research on google and didn't found any workable solution.
If possible provide with examples to work with. I have research on google and didn't found any workable solution.
Re: Filter content with cURL
Thing is, the content filtering bit (rewriting the request to go through your servers instead of the remote servers) is difficult to do. Really difficult. Impossible, even, for stuff like Javascript. Frankly, this sort of thing is best done by actual proxies, even though that requires some client-side configuration since the browser has to know to use the proxy and to trust it with HTTPS content.
If you're developing this for the block then I can't tell you the really popular and versatile way to get around one that Google might know about.
If you're developing this for the block then I can't tell you the really popular and versatile way to get around one that Google might know about.