boyosof Posted February 14, 2013 Share Posted February 14, 2013 Hi everybody .. i have a URL i am using it to send SMS, it is like h**ps://www.domain.net/api/?username=[username]&password=[Password]&sms=[Message]&mobile=[mobile_numbers]&binary=[language_Flag] and i am using the following code to get the file content because it show a message based on the result of sending the message (sent, fail, or other result) <?php $msgurl='h**ps://www.domain.net/api/?username=[username]&password=[Password]&sms=[Message]&mobile=[mobile_numbers]&binary=[language_Flag]'; $result=file_get_contents($msgurl); switch($result) { case '1': echo 'Success'; break; case '0': echo 'Fail'; break; case 'Invalid login': echo 'Invalid login'; break; case 'Missing or Empty Field': echo 'Missing or Empty Field'; break; case 'Invalid Message Language': echo 'Invalid Message Language'; break; case 'Insufficent Balance': echo 'Insufficent Balance'; break; case 'Invalid Sender': echo 'Invalid Sender'; break; case 'Sender name is not activated': echo 'Sender name is not activated'; break; } ?> the problem that when i put the file name in the URL like (sendsms.php) and then the parameters, the above code show the result correctly , but when i remove the file name ... i don't get any result. So is it possible to get the file content from a URL like that? Link to comment https://forums.phpfreaks.com/topic/274499-get-file-content-hidden-extension/ Share on other sites More sharing options...
jcbones Posted February 15, 2013 Share Posted February 15, 2013 Are you using an Apache Server? Do you have mod_rewrite enabled? Have you set up "pretty URLs" in an .htaccess file? Link to comment https://forums.phpfreaks.com/topic/274499-get-file-content-hidden-extension/#findComment-1412536 Share on other sites More sharing options...
boyosof Posted February 15, 2013 Author Share Posted February 15, 2013 actually it is not possible to know that info, because i got that URL from a service provider to send SMS Link to comment https://forums.phpfreaks.com/topic/274499-get-file-content-hidden-extension/#findComment-1412563 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.