OK, I am creating a bridge from a local program to my website and I am trying to find the best way to upload the client file from the local program (which is a CSV file) to my server. I was thinking I could use cURL to accomplish this feat. Basically the local program will invoke a batch file that opens my site with the path of the local file (which is the same file name and path everytime), then use cURL to upload that file to my server to be parsed and input into the database. Can this be done?
If so, I would have to just point the cURL to the .php file that would accept the uploaded file correct? And could I use POST for this with multi-form data and not PUT? Any input on this would be great, thanks.
Maybe something similar to this...
Code: $file='testWordDoc.doc';
echo $file;
$ch = curl_init('http://myurl.com/recieve_posted.php');
curl_setopt($ch, CURLOPT_POSTFIELDS, array('file'=>"@$file",'testkey'=>'test value'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);
print "$postResult";
tell csv import script to ignore blank rows?
Hi i have the below script but i get an error if a row is blank ie a return in the csv file at the end i need to somehow tell it to skip the rows that have nothing on them:Code: <?php // define
modifying query string with no page refresh
Hi everybody,I've tried to get info about my problem all over the internet but i didn't find out what I need.The question is: how can I modify the querystring in PHP with no page refresh?Facebook uses
How to display objects in a row
I have 7 codes that i want to display in a row one next to another.The first is {$ads->ads_display('1')}, the second {$ads->ads_display('2')} and so on...They appear one under the other.
Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched the 'net, but every tutorial I found the writer seems to get 'too technical' after a few steps. I
redirect standard error and assert (how to?)
How do you redirect standard error and assert?---(Why? I am creating an web app and assert does not show on the webpage. I do not think standard error does either. Not sure, but fairly certain.
getting Vars to pass to next page.
Hello all, I have a confusing situation on my hands, i am a member of a gaming community and we are setting up a website (yay i get to be teh techie!!) im not exactly a noob with php but i am by far
Post PHP form to non-existing page
The company that I work for host their PHP code on IIS on a Windows server, no Apache, so no mod_rewrite. I recently wrote a custom framewok that is loosely based on Codeigniter. To get SEF URL's 'n
Email/MMS to Site
Hey guys. I'm looking for a way for a user to upload images and/or text via their cell phones. It could be MMS but since most phones have email these days, maybe just a way to process email. I've
PHP login form help (Done Most of It)
Hi i am having a problem, when i try logging in it is always saying "Invalid Login" im not sure what is going wrong, a week ago i had it working. I cant remember the change i did but i know
Frustrated php Newbie
First off, I am pretty much a PHP nub. I can read and understand the language (most of the time) so I figured I could get this to work.So, my plan was to make a simple SQL server with a PHP bullitin