Hi,
I am kindof new with PHP but I code javascript and I think I can pick it up. I am trying to call a PHP file located on an external server, probably using some kind of include, and pass some data to it in order to complete a task. I am then going to run this on a cronjob. The problem is that this site requires that you login using the Twitter Oauth login before you can do this. The easiest way I can see of getting round this is to fake the cookie data when you run the include. However being a PHP newb I cannot work out if this is even possible although I find it likely that it is. Any help would really be appreciated even if you're just telling me it's not possible. Also, if anyone knows of a better way of doing this without the cookie thing then that's great.
Thanks people,
SeriousSamP
Call an external PHP file with fake cookie data
Moderator: General Moderators
-
SeriousSamP
- Forum Newbie
- Posts: 8
- Joined: Thu Apr 08, 2010 5:27 pm
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Call an external PHP file with fake cookie data
Use cURL. See the manual. There is also a library named Snoopy if you do not have the cURL extension.
(#10850)
-
SeriousSamP
- Forum Newbie
- Posts: 8
- Joined: Thu Apr 08, 2010 5:27 pm
Re: Call an external PHP file with fake cookie data
Thanks that seems to work.
Kindof. I am having some issues but have started a new thread. 