without going into too much details I wanna tell you that fopen and curl are two different tools desighed to do different tasks.
For instance, cURL is a library in php for transferring data with URL syntax, supporting DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP, POP3S, RTMP, RTSP, SCP, SFTP, SMTP and so forth protocols, a lot of these protocols are not supported by fopen at least is not very suitable to handle the data with fopen or other similar tools.
On the other hand, fopen is a tool desighed to open files or URL's from remote distance, so if you have a big video file in the remote
machine and want to write down on the local one you should better use fopen and fread to chunk the file into some parts writting it in the local machine.
Based on your example I see, you want to grab a web page into a string, so to increase the speed a little more you could use the file_get_contents function instead of fopen or curl. It would be similar like:
$context = stream_context_create(array('http' => array(
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query(array('query' => '18.104.22.168'))
// Open the file using the HTTP headers set above
$file = file_get_contents('http://www.iplocation.net/index.php', false, $context);
Also I would like to ask you how to send request simulation input checked but the inputs have all same name:
I am not entirly sure what, exactly you want to do here but.....it sounds you should use cURL to login into the web page and set check attributes to these checkboxes you want to be checked.
Edited by jazzman1, 21 December 2013 - 02:56 PM.