For a strange problem that development cannot return data, run the code first:
// Get the code of the td column $ regex = "/([\ S \ S] *?) <\/Td>/"; $ str = file_get_contents ('http: // records); $ matches = array (); preg_match_all ($ regex, $ str, $ matches ); echo "\ n"; // Obtain the URL $ href = '// is'; $ href_single = array (); if (preg_match ($ href, $ matches [0] [1], $ href_single) // Obtain table information based on the obtained URL $ regex = '/
The query seems to be a problem with Sina sae, but I don't know how to solve it.
SAE cannot use the file_get_contents function
SAE cannot use the file_get_contents function
Well, we can use $ f = new SaeFetchurl (); $ str = $ f-> fetch ($ href_single [1, however, file_get_contents can directly input the URL string.
. * ([\ D \.] + ?). * <\/Table>/sU '; $ str = file_get_contents ($ href_single [1]); $ matches = array (); if (preg_match ($ regex, $ str, $ matches) $ result = $ this-> transmitText ($ object, $ matches ); [Size = 13px] the function I want to implement is to send a request to a mobile phone user. the server obtains the specified information by using a regular expression in the html code of a website, and then returns it to the user through the interface, however, when a client user sends a request, it cannot receive the returned information. I thought it was caused by the timeout of the server connection to the corresponding website, however, when I change $ href_single [1] in the fourth last line of the code to an http URL, the mobile terminal can receive the returned information after testing, however, the content in $ href_single [1] is actually an http website. The formats are the same. what is the problem? [/Size] Reply to discussion (solution)