last day (14 days later) » 

7:39 AM
0
A: Cant get the html dom by php curl.

KoalaGangstaHere is a fixed working code to grab the code of the page. $cookie = tempnam ("/tmp", "CURLCOOKIE"); $ch = curl_init(); function get_data( $curl, $url, $post, $cookie ){ $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7"; curl_se...

 
It is not working. Did you test it ?
Why you changed the CURLOPT_SSL_VERIFYPEER to flase, although it has https in the URL ?
 
Yep, working for me on local server. Before fix i got the same redirect like you to localhost/FCS... But first, llook at the source of the website. Do you think you can use it without first run the JS?
The verifypeer to false is actually the change which makes it working on my local server. I had the problem once when trying login into a game and for some reason I also had to make similar changes to make it work.
 
I have used the same thing in my localhost, But get the same problem. What do you mean first run the JS. I am trying to do it by PHP curl
 
Do you use the exact same code? Does the folder "tmp" exist and does it have the needed rights? Also it seems like the
 
Yes, i have used the same code. And i have used the same thing to call another page, which was no error.
Even i changed the network. But dont work for me. I have used the same, exact same code.
 
7:39 AM
Also tried to change the user agent? This seems to make a difference too in this case.
 
Yes i have checked your comment, I have changed to this $agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7";
But, i have another question, where did you declare the $curl variable ? Why did you need to change that ?
Although, i have used. It is not working.
And can we talk in chat, If you have time ?
 
Just wanted to be sure that theres no conflic going on. Try the echo with htmlspecialchars() (Just copy the code 1:1 which i edited in the post). It is clearly working here from 2 local servers in same network. If it doesnt work for you i dont know sorry :/
 
Hello
Are you there ?
 

last day (14 days later) »