how to download files require login
For URLs like 'http://download.fotolia.com/DownloadContent/1/h7G0bWGsGof8V vSqw32xFZ0KvD5eqbvN',
it requires user login to download.
Then how do I download it remotely via php server if I have the
username and password in hand?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: how to download files require login
--=-NfCpVxb48O85yDsbW9EP
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Mon, 2010-03-01 at 11:37 -0500, Ryan Sun wrote:
> For URLs like 'http://download.fotolia.com/DownloadContent/1/h7G0bWGsGof8V vSqw32xFZ0KvD5eqbvN',
> it requires user login to download.
> Then how do I download it remotely via php server if I have the
> username and password in hand?
>
This is a job for Curl. You create a Curl request that sends the login
information to the remote site in the form that it expects (usually via
some sort of post data from a form) and then you can receive the reply
back. You can then form your requests that you need to make for the
rest.
There are some great add-ons for Firefox for this sort of thing, to look
at what data is being sent to and from your browser.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-NfCpVxb48O85yDsbW9EP--
Re: how to download files require login
On 1 March 2010 17:00, Ashley Sheridan <ash [at] ashleysheridan.co.uk> wrote:
> On Mon, 2010-03-01 at 11:37 -0500, Ryan Sun wrote:
>
>> For URLs like 'http://download.fotolia.com/DownloadContent/1/h7G0bWGsGof8V vSqw32xFZ0KvD5eqbvN',
>> it requires user login to download.
>> Then how do I download it remotely via php server if I have the
>> username and password in hand?
>>
>
>
> This is a job for Curl. You create a Curl request that sends the login
> information to the remote site in the form that it expects (usually via
> some sort of post data from a form) and then you can receive the reply
> back. You can then form your requests that you need to make for the
> rest.
>
> There are some great add-ons for Firefox for this sort of thing, to look
> at what data is being sent to and from your browser.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
If the authentication style is basic you COULD use the
http://username:password [at] www.host.com/page.xxxxxx
--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Going from IIS6 to WAMP
SGkgQWxsLA0KDQpJIGhhdmUgYSB3b3JraW5nIGFwcGxpY2F0aW9uIGluIFBI UCA1LjMgdW5kZXIg
SUlTNi4gSSd2ZSBjcmVhdGVkIGEgV0FNUCBzZXJ2ZXIgKFdpbmRvd3MsIEFw YWNoZSwgTXlTUUws
IFBIUCkgb24gYSBkZWRpY2F0ZWQgc2VydmVyLCBhbmQgSSdtIHRyeWluZyB0 byBtb3ZlIHRoZSBh
cHBsaWNhdGlvbiB0byB0aGUgbmV3LCBkZWRpY2F0ZWQgc2VydmVyLg0KDQpN eSBmaXJzdCBwcm9i
bGVtLCB0aGUgbmV3IHNlcnZlciBkb2Vzbid0IGxpa2UgdGhpcyBsaW5lIG9m IGNvZGUgaW4gdGhl
IGRlZmF1bHQucGhwOg0KPD9waHAgaW5jbHVkZSgnZm9yY2Vfc3NsLnBocCcp Oz8+DQoNCihJdCB3
b3JrcyBmaW5lIG9uIHRoZSBjdXJyZW50IHNlcnZlcikNCg0KSWYgSSByZW1v dmUgdGhlIGFib3Zl
IGxpbmUsIHRoZSBwYWdlIHNob3dzIGZpbmUuIElmIHRoZSBsaW5lIGlzIHRo ZXJlLCB0aGUgcGFn
ZSBjYW5ub3QgYmUgZGlzcGxheWVkIChub3Qgc3VyZSBob3cgdG8gbWFrZSBp dCBzaG93IHRoZSBh
Y3R1YWwgZXJyb3IsIHNpbmNlIGVycm9yIGxvZ2dpbmcgaXMgb24sIGFuZCBl cnJvcl9yZXBvcnRp
bmcgPSBFX0FMTCkNCg0KSW4gdGhlIEFwYWNoZSBodHRwZC5jb25mIGZpbGUs IEkgaGF2ZSB0aGUg
Zm9sbG93aW5nOg0KPERpcmVjdG9yeSAiYzovd2FtcC93d3cvbXlhcHBsaWNh dGlvbmZvbGRlciI+
DQogICAgRGlyZWN0b3J5SW5kZXggZGVmYXVsdC5waHANCiAgICBPcHRpb25z IEZvbGxvd1N5bUxp
bmtzIEluY2x1ZGVzDQogICAgQWxsb3cgZnJvbSBhbGwNCjwvRGlyZWN0b3J5 Pg0KDQpJJ20gYXNz
dW1pbmcgdGhpcyBhbGxvd3MgImluY2x1ZGVzIi4uLi4NCg0KRG9lcyBhbnlv bmUgaGF2ZSBhbnkg
aWRlYT8NCg==
Re: Going from IIS6 to WAMP
What does it do? Force the connection to https? if so you need to
configure Apache to serve over https.
David Stoltz wrote:
> Hi All,
>
> I have a working application in PHP 5.3 under IIS6. I've created a WAMP server (Windows, Apache, MySQL, PHP) on a dedicated server, and I'm trying to move the application to the new, dedicated server.
>
> My first problem, the new server doesn't like this line of code in the default.php:
> <?php include('force_ssl.php');?>
>
> (It works fine on the current server)
>
> If I remove the above line, the page shows fine. If the line is there, the page cannot be displayed (not sure how to make it show the actual error, since error logging is on, and error_reporting = E_ALL)
>
> In the Apache httpd.conf file, I have the following:
> <Directory "c:/wamp/www/myapplicationfolder">
> DirectoryIndex default.php
> Options FollowSymLinks Includes
> Allow from all
> </Directory>
>
> I'm assuming this allows "includes"....
>
> Does anyone have any idea?
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Going from IIS6 to WAMP
RXZlbiBpZiBJIGNvbW1lbnQgb3V0IHdoYXQncyBpbiB0aGUgaW5jbHVkZSBm aWxlLCBpdCBzdGls
bCBlcnJvcnMuDQoNCkl0J3MgdGhlIGFjdHVhbCAiaW5jbHVkZSIgc3RhdGVt ZW50IGNhdXNpbmcg
dGhlIGVycm9yLCBub3Qgd2hhdCdzIGluIGl0Li4uLg0KDQoNCi0tLS0tT3Jp Z2luYWwgTWVzc2Fn
ZS0tLS0tDQpGcm9tOiBSb2JlcnQgQ3VtbWluZ3MgW21haWx0bzpyb2JlcnRA aW50ZXJqaW5uLmNv
bV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ob3cg dG8gbWFrZSBpdCBz
aG93IHRoZSBhY3R1YWwgZXJyb3IsIHNpbmNlIGVycm9yIGxvZ2dpbmcgaXMg b24sIGFuZCBlcnJv
cl9yZXBvcnRpbmcgPSBFX0FMTCkNCj4gDQo+IEluIHRoZSBBcGFjaGUgaHR0 cGQuY29uZiBmaWxl
LCBJIGhhdmUgdGhlIGZvbGxvd2luZzoNCj4gPERpcmVjdG9yeSAiYzovd2Ft cC93d3cvbXlhcHBs
aWNhdGlvbmZvbGRlciI+DQo+ICAgICBEaXJlY3RvcnlJbmRleCBkZWZhdWx0 LnBocA0KPiAgICAg
T3B0aW9ucyBGb2xsb3dTeW1MaW5rcyBJbmNsdWRlcw0KPiAgICAgQWxsb3cg ZnJvbSBhbGwNCj4g
PC9EaXJlY3Rvcnk+DQo+IA0KPiBJJ20gYXNzdW1pbmcgdGhpcyBhbGxvd3Mg ImluY2x1ZGVzIi4u
Li4NCj4gDQo+IERvZXMgYW55b25lIGhhdmUgYW55IGlkZWE/DQoNCi0tIA0K aHR0cDovL3d3dy5p
bnRlcmppbm4uY29tDQpBcHBsaWNhdGlvbiBhbmQgVGVtcGxhdGluZyBGcmFt ZXdvcmsgZm9yIFBI
UA0K
RE: Going from IIS6 to WAMP
--=-g1P8cGlzvKObaVCG2kE6
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Mon, 2010-03-01 at 13:37 -0500, David Stoltz wrote:
> Even if I comment out what's in the include file, it still errors.
>
> It's the actual "include" statement causing the error, not what's in it....
>
>
> -----Original Message-----
> From: Robert Cummings [mailto:robert [at] interjinn.com]
> Sent: Monday, March 01, 2010 1:33 PM
> To: David Stoltz
> Cc: php-general [at] lists.php.net
> Subject: Re: [PHP] Going from IIS6 to WAMP
>
> What does it do? Force the connection to https? if so you need to
> configure Apache to serve over https.
>
>
>
>
> David Stoltz wrote:
> > Hi All,
> >
> > I have a working application in PHP 5.3 under IIS6. I've created a WAMP server (Windows, Apache, MySQL, PHP) on a dedicated server, and I'm trying to move the application to the new, dedicated server.
> >
> > My first problem, the new server doesn't like this line of code in the default.php:
> > <?php include('force_ssl.php');?>
> >
> > (It works fine on the current server)
> >
> > If I remove the above line, the page shows fine. If the line is there, the page cannot be displayed (not sure how to make it show the actual error, since error logging is on, and error_reporting = E_ALL)
> >
> > In the Apache httpd.conf file, I have the following:
> > <Directory "c:/wamp/www/myapplicationfolder">
> > DirectoryIndex default.php
> > Options FollowSymLinks Includes
> > Allow from all
> > </Directory>
> >
> > I'm assuming this allows "includes"....
> >
> > Does anyone have any idea?
>
The only error that the include statement could cause would be if the
server couldn't find the path to the file you were referencing, so it's
more likely to be an error with the contents of the include. Have you
checked your error logs? You can find out where these are by running a
phpinfo() script.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-g1P8cGlzvKObaVCG2kE6--
Re: Going from IIS6 to WAMP
David Stoltz wrote:
> Hi All,
>
> I have a working application in PHP 5.3 under IIS6. I've created a WAMP server (Windows, Apache, MySQL, PHP) on a dedicated server, and I'm trying to move the application to the new, dedicated server.
>
> My first problem, the new server doesn't like this line of code in the default.php:
> <?php include('force_ssl.php');?>
>
> (It works fine on the current server)
>
> If I remove the above line, the page shows fine. If the line is there, the page cannot be displayed (not sure how to make it show the actual error, since error logging is on, and error_reporting = E_ALL)
>
> In the Apache httpd.conf file, I have the following:
> <Directory "c:/wamp/www/myapplicationfolder">
> DirectoryIndex default.php
> Options FollowSymLinks Includes
> Allow from all
> </Directory>
>
> I'm assuming this allows "includes"....
>
> Does anyone have any idea?
First off, please start a new message instead of taking someones message
changing the subject and "trying" to call it your own.
Besides that...
Sounds like you have an include issue.
On the WAMP setup, modify your php.ini file so it will display_errors = on and
error_reporting = E_ALL
restart apache and you will see any errors that are being generated.
The directory block that you are showing us has nothing to do with PHP's include
process. The only thing that it does it set the DirectoryIndex to use
default.php instead of the index.htm, index.html, or index.php
Basically, with PHP, you need to make sure that anything you include is actually
in your include path. Check that and let us know what you find.
--
Jim Lucas
NOC Manager
541-323-9113
BendTel, Inc.
http://www.bendtel.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php