file_get_contents error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zahiz0007
Forum Newbie
Posts: 2
Joined: Fri Jul 08, 2011 1:59 am

file_get_contents error

Post by zahiz0007 »

Hey all,


the following code works great on regualr browser (meanning through inserting it in the address bar):

Code: Select all

http://www.thevideopoint.com:8080/VideoPointWeb/UpdateVideoCount.jsp?Command=createCustomer&customerName=SomeText
It return some strings (numbers).

When I try to run this through WAMP in a site I created I get 0.

can someone spot the different and why the first work and the second doesn't?

thx!
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: file_get_contents error

Post by social_experiment »

To access that file you will have to be connected to the internet

I read this tip in the manual under the get_file_contents() description, maybe this is causing the error
The Manual wrote:A URL can be used as a filename with this function if the fopen wrappers have been enabled. See fopen() for more details on how to specify the filename and List of Supported Protocols/Wrappers for a list of supported URL protocols.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
zahiz0007
Forum Newbie
Posts: 2
Joined: Fri Jul 08, 2011 1:59 am

Re: file_get_contents error

Post by zahiz0007 »

Thanks for the replay,

I am connected to the internet.

Is it possible can't access through port 8080?

(I do not have skype).
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: file_get_contents error

Post by social_experiment »

zahiz0007 wrote:Is it possible can't access through port 8080?
No idea
...cant+open+http+with+file_get_contents
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
Post Reply