homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

Run php script from remote server
And pass username and password

 8:42 am on Jan 10, 2012 (gmt 0)

I need to call a php script to import data. I am doing this via VB.NET as follows

Dim myProcess As New System.Diagnostics.Process()
myProcess.StartInfo = New System.Diagnostics.ProcessStartInfo("iexplore.exe", "http://......./pages_system/datasync.php")

I have put username and password on the php page but now the automation fails. Any ideas how to pass the credentials (LAMP) - any language will do ?




 2:58 pm on Jan 10, 2012 (gmt 0)

Are you saying that you have secured the PHP script on the remote server and it requires authentication first before it will respond to the http request?


 10:04 pm on Jan 10, 2012 (gmt 0)

Yes, thats right when I navigate to it manually it now prompts me to logon.


 5:39 pm on Jan 12, 2012 (gmt 0)

I do not know how to do this in ASP or .NET but what I do when I need to post to a site like that is open a socket connection and handle the transaction on the server side. So your VB.NET server talks to the remote PHP-enabled server via a socket connection. A handy tool for this is cURL. Rather than open and control the socket and communication you can use the cURL API's for your particular server platform.


 4:01 pm on Jan 20, 2012 (gmt 0)

I think thats what the .net code is doing, somewhere beneath the TCP/IP layers in the .net line of code a socket is being created to the remote server...

I just need to figure out how to pass credentials to authenticate when challenged by the server, in any language - PHP, .Net, cURL


 3:48 pm on Feb 2, 2012 (gmt 0)

The basics are laid out in the text docs on the cURL site:
and searching for something like "curl post login" or variations on that search should turn up some examples you could follow to get started. Wish I could offer more my friend.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved