Search Results

Search found 42698 results on 1708 pages for 'php in array'.

Page 82/1708 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • How to add GD to a PHP 5.3 CentOS installation from a different repo?

    - by Mauro
    I installed PHP 5.3 on a CentOS 5.3 using yum and repos from Webtatic (http://www.webtatic.com/packages/php53/) and now I'd like to add the GD library to that installation but Webtatic seems to be offline. Now: # yum install php-gd Fails of course (not the same PHP version) into: *Error: Missing Dependency: php-common = 5.1.6-27.el5_5.3 is needed by package php-gd-5.1.6-27.el5_5.3.x86_64* And: # yum install php53-gd Fails into Error: php53-common conflicts with php-common How can I add the GD libraries now?

    Read the article

  • Reconfiguring PHP with OpenSSL Extension on CentOS

    - by Evan
    Hi Guys - Long time browser, first time poster! I have a CentOS Dedicated server running just fine. I'm trying to reconfigure PHP to include the OpenSSL extensions so I can use some of the Youtube API's. I installed OpenSSL with yum, so it's in place on the server. I'm just now having trouble getting PHP to use it as an extension. I got the latest PHP tarball, untarred, set my configure string (./configure) using the proper parameter for openssl (--with-openssl=/usr) and it checked out just fine. I ran Make, then Make Install. I am getting hung up here. After it makes the PEAR config file it seems to quit. I guess I'm not sure, but it seems like there is a LOT more that should be happening. Here is a screenshot: http://www.evanfell.com/screencaps/6iamks.png Restarting apache shows no change to the PHP running on the server. Is there are PEAR issue killing the Install process? Or is there an other issue? Thanks In Advance. Happy to clarify and provide more info.

    Read the article

  • MySQL extension of PHP not working

    - by Víctor
    In a Debian server, and after intallation and removal of SquirrelMail (with some downgrade and upgrade of php5, mysql...) the MySQL extension of PHP has stopped working. I have php5-mysql installed, and when I try to connect to a database through php-cli, i connect successfully, but when I try to connect from a web served by Apache I cannot connect. This script, run by php5-cli: echo phpinfo(); $link = mysql_connect('localhost', 'user, 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); Prints the phpinfo, which includes "/etc/php5/cli/conf.d/mysql.ini", and also the MySQL section with all the configuration: SOCKET, LIBS... And then it prints "Connectes successfully". But when run by apache accessed by web browser, it displays the phpinfo, which includes "/etc/php5/apache2/conf.d/mysql.ini", but has the MySQL section missing, and the script dies printing "Fatal error: Call to undefined function mysql_connect()". Note that both "/etc/php5/cli/conf.d/mysql.ini" and "/etc/php5/apache2/conf.d/mysql.ini" are in fact the same configuration, because I have in debian the structure: /etc/php5/apache2 /etc/php5/cgi /etc/php5/cli /etc/php5/conf.d And both point at the same directory: /etc/php5/apache2/conf.d -> ../conf.d /etc/php5/cli -> ../conf.d Where /etc/php5/conf.d/mysql.ini consists of one line: extension=mysql.so So my question is: why is the MySQL extension for PHP not working if I have the configuration included just in the same way as in php-cli, which is working? Thanks a lot!

    Read the article

  • Windows authentication to SQL Server via IIS and PHP

    - by Jeff
    We're running a PHP 5.4 application on Server 2008 R2. We would like to connect to a SQL Server 2008 database, on a separate server, using Windows authentication (must be Windows authentication--the DB admins won't let us connect any other way). I have downloaded the SQL Server drivers for PHP and installed them. IIS is configured for Windows authentication, and anonymous authentication has been disabled. $_SERVER['AUTH_USER'] reports our currently logged on Windows account. In php.ini, we have set fastcgi.impersonate = 1. When we setup a connection using the following code from Microsoft: $serverName = "sqlserver\sqlserver"; $connectionInfo = array( "Database"=>"some_db"); /* Connect using Windows Authentication. */ $conn = sqlsrv_connect( $serverName, $connectionInfo); if( $conn === false ) { echo "Unable to connect.</br>"; die( print_r( sqlsrv_errors(), true)); } We are presented with the following error message: Unable to connect. Array ( [0] => Array ( [0] => 28000 [SQLSTATE] => 28000 [1] => 18456 [code] => 18456 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. [message] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. ) Is it possible to connect to SQL Server 2008 via PHP using Windows authentication? Are there any additional required settings we need to make on IIS, SQL Server, or any other component (like a domain controller)?

    Read the article

  • Apache2 doesn't serve PHP-scripts correctly

    - by cmbrnt
    I've run into a problem with my Apache 2.2.16 configuration, running on Debian Squeeze. The problem is that it stopped serving PHP5-scripts completely. When I try to access the sites with Google Chrome, it instead downloads a file called "download", which contains the contents of the script. This is of course not a good thing. It does serve common html-files perfectly... I've been at this for quite a while now, and after all the googling and troubleshooting, I thought it would be a good time to ask you guys. Here's what I've got: The php5 and libapache2-mod-php5 packages are installed /etc/apache2/mods-available contains both php5.load and php5.conf, and these are symlinked from the mods-enabled directory The /etc/php5/ directory is left untouched since the installation. Here's the contents of /etc/apache2/mods-available/php.load: LoadModule php5_module /usr/lib/apache2/modules/libphp5.so And /etc/apache2/mods-available/php.conf: <IfModule mod_php5.c> <FilesMatch "\.ph(p3?|tml)$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> <IfModule mod_userdir.c> <Directory /home/*/public_html> php_admin_value engine Off </Directory> </IfModule> </IfModule> What am I missing? This is a server with modified virtual hosts and the like, so I might have changed some settings which causes this problem, but simply purging and reinstalling is not an option so far, since the configuration is quite extensive. Any help would be great. Thanks.

    Read the article

  • Why is crontab giving "No such file or directory" error when the file DOES exist?

    - by fettereddingoskidney
    I am getting the following three lines in an error message in /var/mail/username after the following job runs in crontab... 15 * * * * /Applications/MAMP/htdocs/iconimageryidx/includes/insertPropertyRESI.php Errors: /applications/mamp/htdocs/iconimageryidx/includes/insertpropertyRESI.php: line 1: ?php: No such file or directory /applications/mamp/htdocs/iconimageryidx/includes/insertpropertyRESI.php: line 3: syntax error near unexpected token `'initialize.php'' /applications/mamp/htdocs/iconimageryidx/includes/insertpropertyRESI.php: line 3: `require_once('initialize.php'); The PHP script I am trying to execute DOES in fact exist, and I have made absolutely sure the spelling is correct several times. I ran a crontab on another script before and it worked just fine...any ideas?? The 2nd & 3rd Errors are from line 3 in the following script (the one I am trying to run with the crontab): <?php require_once('initialize.php'); require_once('insertPropertyTypes.php'); $sDate; if(isset($_GET['startDate'])) { $sDate = $_GET['startDate']; } else { $sDate = ''; } $insertResi = new InsertPropertyTypes('Listing', $sDate, 'RESI'); ?> When I run my script insertPropertyRESI.php in the browser, it runs just fine???? Also, initialize.php and insertPropertyTypes.php are in the same directory as insertPropertyRESI.php I am using MAMP with PHP 5.3.5 thakns for the help :?

    Read the article

  • Apache 2.4 with PHP-FPM

    - by tubaguy50035
    I'm trying to setup Apache 2.4 with PHP-FPM 5.4 using the new modules with Apache 2.4. The following is what I have currently in my virtual host file: <VirtualHost *:80> ServerAdmin root@localhost DocumentRoot /var/www #Directory permissions <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride None Require all granted </Directory> CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> I have PHP-FPM running using Unix sockets with a sock file located at /var/run/php5-fpm.sock. How do I proxy my requests to this sock file? I've seen some sites say to use ProxyPassMatch and others are saying Rewrite Rule. Are there pros or cons on either side? Also, most sites I'm seeing are showing ProxyPassMatch with a regex to only pass .php files. Could I also send it .html files? For whatever reason, we have a ton of PHP inside .html files. Edit: As noted in the comments, it looks like mod_proxy_fcgi doesn't support Unix sockets. Is there another module I should be using?

    Read the article

  • Have apache choose a php version based on the extension in the url, but with a single file on the filesystem

    - by Somejan
    I want to configure a local apache server to serve php files with different php versions. In my document root I have phpinfo.php, now if I go to http://localhost/phpinfo.php4, I want to see the phpinfo.php file processed with php4, if I go to http://localhost/phpinfo.php5 I want to see the same file processed with php5. Note: both php 4 and 5 are already installed side by side, I have no problem configuring apache to treat files that have a .php4 or .php5 extension on the filesystem with the correct php version. What I want is for apache to do the following: If the url-path ends in .php5, serve the file which has a .php extension on the filesystem using the application/x-httpd-php5 handler. If the url-path ends in .php4, serve the same file with the .php extension on the filesystem using the application/x-httpd-php4 handler.

    Read the article

  • Apache2 doesn't serve PHP-scripts correctly [closed]

    - by cmbrnt
    I've run into a problem with my Apache 2.2.16 configuration, running on Debian Squeeze. The problem is that it stopped serving PHP5-scripts completely. When I try to access the sites with Google Chrome, it instead downloads a file called "download", which contains the contents of the script. This is of course not a good thing. It does serve common html-files perfectly... I've been at this for quite a while now, and after all the googling and troubleshooting, I thought it would be a good time to ask you guys. Here's what I've got: The php5 and libapache2-mod-php5 packages are installed /etc/apache2/mods-available contains both php5.load and php5.conf, and these are symlinked from the mods-enabled directory The /etc/php5/ directory is left untouched since the installation. Here's the contents of /etc/apache2/mods-available/php.load: LoadModule php5_module /usr/lib/apache2/modules/libphp5.so And /etc/apache2/mods-available/php.conf: <IfModule mod_php5.c> <FilesMatch "\.ph(p3?|tml)$"> SetHandler application/x-httpd-php </FilesMatch> <FilesMatch "\.phps$"> SetHandler application/x-httpd-php-source </FilesMatch> <IfModule mod_userdir.c> <Directory /home/*/public_html> php_admin_value engine Off </Directory> </IfModule> </IfModule> What am I missing? This is a server with modified virtual hosts and the like, so I might have changed some settings which causes this problem, but simply purging and reinstalling is not an option so far, since the configuration is quite extensive. Any help would be great. Thanks.

    Read the article

  • virtual web folder served by PHP script

    - by Martin
    I am trying to configure my apache to be able to display (virtual) pages like: mywebpage.com/something1 mywebpage.com/something2 mywebpage.com/folder/something3 I would like these "somethingX" and "folder" folders to be only virtual, not physical directories. For a start it would be great to send all requests to mywebpage to one PHP script which will somehow receive the original path information (there is some SERVER array as far as I know) and call necessary PHP functions (so far I use addresses like mywebpage.com/index.php?page=blabla&otherparameters=values...). Is that possible? I am struggling with different combination, currently I am with following file in /etc/apache2/conf.d/something.conf (not working of course). What is the correct way to proceed? Thanks. <Location /myweb> SetHandler my-handler Action my-handler /srv/www/htdocs/myweb/product.php virtual </Location> My pages are in /srv/www/htdocs/myweb. I tried with Location, with Directory, with Action and SetHandler, with AddHandler... ;-) Some configurations were ignored, some caused "object not found" with nothing relevant in error log.

    Read the article

  • How to fix SCRIPT_NAME with PHP-FPM and Apache's mod_fastcgi?

    - by Kyle MacFarlane
    I have the following in my Apache conf to get PHP-FPM working: FastCgiExternalServer /srv/www/fast-cgi-fake-handler -host 127.0.0.1:9000 AddHandler php-fastcgi .php AddType text/html .php Action php-fastcgi /var/www/cgi-bin Alias /var/www/cgi-bin /srv/www/fast-cgi-fake-handler DirectoryIndex index.php This works fine except that SCRIPT_NAME is always /var/www/cgi-bin and some scripts use SCRIPT_NAME to work out the location of the current script (vBulletin). Google has plenty of solutions for Nginx but not a word for Apache.

    Read the article

  • PHP 5.3.5 Windows installer missing php_ldap.dll

    - by nmjk
    I'm working with Windows Server 2008, Apache 2.2. I'm using php-5.3.5-Win32-VC6-x86.msi as the installer, using the threadsafe version. I've gone through the install process four or five times just to make sure that I'm not missing anything ridiculous, but I don't think I am. The problem is that the php_ldap.dll extension simply doesn't seem to exist. It's not present in the installer interface (where the user is asked to choose which extensions to install), and it definitely doesn't appear in the ext/ directory after install. I found a lot of mentions of this issue for 5.3.3, including links to download the extension individually. Those links no longer exist, of course, and besides: they were for 5.3.3. I'd really rather use an extension that belongs with PHP 5.3.5. Anyone else encounter this problem? Any ideas as to what's going wrong? Anyone seen acknowledgement by the PHP folks that the file is indeed missing, and that it's an oversight? It's quite a frustration because the server I'm building has no purpose if I don't have PHP LDAP support. Cheers all, and thanks in advance for your assistance.

    Read the article

  • Apache downloads php files instead of running their source

    - by Devils Child
    I have just recently upgraded PHP 5.3 to 5.4 on my Debian Squeeze server. Now, instead of executing PHP files, Apache just downloads them, which is really bad. When I try to follow these steps, I get "broken packages" upon installing the libapache2-mod-php5 package. Also the answer tells me to add something to my httpd.conf, but it's empty. Question: How can I make apache execute php files again, instead of just passing them through as download? dpkg -l | grep php returns this rc libapache2-mod-php5 5.3.3-7+squeeze15 server-side, HTML-embedded scripting language (Apache 2 module) rc php5-cli 5.3.3-7+squeeze15 command-line interpreter for the php5 scripting language ii php5-common 5.4.15-1~dotdeb.2 Common files for packages built from the php5 source rc php5-gd 5.3.3-7+squeeze15 GD module for php5 rc php5-mcrypt 5.3.3-7+squeeze15 MCrypt module for php5 rc php5-mysql 5.3.3-7+squeeze15 MySQL module for php5 rc php5-suhosin 0.9.32.1-1 advanced protection module for php5 rc phpmyadmin 4:3.3.7-7 MySQL web administration tool And apt-get install libapache2-mod-php5 produces this error The following packages have unmet dependencies: libapache2-mod-php5 : Depends: libdb5.1 but it is not installable Depends: libssl1.0.0 (>= 1.0.0) but it is not installable Depends: libxml2 (>= 2.8.0) but 2.7.8.dfsg-2+squeeze7 is to be installed Recommends: php5-cli but it is not going to be installed E: Broken packages

    Read the article

  • Rearrange array

    - by bradenkeith
    Array starts like this: Array ( [SMART Board] => Array ( [0] => sb1 [1] => sb2 [2] => sb3 ) [Projector] => Array ( [0] => pr1 [1] => pr2 [2] => pr3 ) [Speakers] => Array ( [0] => sp1 [1] => sp2 [2] => sp3 ) [Splitter] => Array ( [0] => spl1 [1] => spl2 [2] => spl3 ) [Wireless Slate] => Array ( [0] => ws1 [1] => ws2 [2] => ws3 ) ) The keys are used as my table columns titles. Their individual arrays are to carry the column information. I have split it up even further with array_slice and array_merge_recursive to look pretty as 2 arrays - 1 holds the column names, the other looks like this: Array ( [0] => sb1 [1] => sb2 [2] => sb3 [3] => pr1 [4] => pr2 [5] => pr3 [6] => sp1 [7] => sp2 [8] => sp3 [9] => spl1 [10] => spl2 [11] => spl3 [12] => ws1 [13] => ws2 [14] => ws3 ) However, when trying to write the table I'm getting keys 0, 1, 2 as the column data, then row break then 3, 4, 5 then row break... etc. I need it to be 0, 3, 6, 9, 12 row break 1, 4, 7, 10, 13 row break etc... How can I either rearrange my array to allow for this, or rewrite how the data goes into the table so that the correct information lines up with the appropriate column? foreach(unserialize($dl->data) as $data){ //first 3 are specialinstructions, system, and room $uniques = array_slice($data,0,3); $rows = array_slice($data,3); $rows2 = array_merge_recursive($rows2, $rows); //get the specialinstructions, system, and room foreach($uniques as $unique){ echo $unique."<br/>"; }///foreach uniques echo "<br>"; }///foreach unserialized $numberofrooms = count($rows2[key($rows2)]); $numberofproducts = count($rows2); print_r($rows2); unset($rows); //write the individual rows foreach($rows2 as $header=>$rowset){ $headers[] = $header; foreach($rowset as $row){ $rows[] = $row; }//foreach rowset }//foreach rows2 echo "<p>"; print_r($rows); echo '<table class="data-table"> <caption>DL</caption> <thead><tr>'; foreach($headers as $header){ echo "<th>".$header."</th>"; } echo '</tr></thead>'; echo '<tbody>'; $i = 0; foreach($rows as $row){ if($i == 3 || $i == 0){ echo "<tr>"; $i = 1; } echo '<td>'.$row.'</td>'; if($i == 2){ echo "</tr>"; } $i++; } echo '</tbody></table>';

    Read the article

  • is GTK Installation (PHP for desktop) affect the web application?

    - by Harshal Mahajan
    I just going to install the GTK for creating a desktop application. But I want to know if we install the GTK then is it affect our web application server or php.ini or other features of web based application? I know there is no requirement of server for desktop but the GTK create the other php.ini . so is it affect my other applications? I downloaded the GTK Tool kit from here. So I am just little bit confusing that it should not affect my all running web applications. I think the php for desktop is a very interesting issue for all of us, so I just want to know the affection of desktop on web?

    Read the article

  • How do you break down a new project with an existing mega PHP site?

    - by Caveatrob
    I've got to dive into a very large PHP site and have my first client meeting today. All they gave me so far was the URL. How do you guys go about gathering/structuring/documenting and preparing for a new project in a PHP environment? What things do you ask for up front? PS - I know there are other general questions about this but I want a PHP-flavored one, including tools (even if universal) and approaches. Thanks!! I'm excited but also scared.

    Read the article

  • client website compromised, found a strange .php file. any ideas?

    - by Kevin Strong
    I do support work for a web development company and I found a suspicious file today on the website of one of our clients called "hope.php" which contained several eval(gzuncompress(base64_decode('....'))) commands (which on a site like this, usually indicates that they've been hacked). Searching for the compromised site on google, we got a bunch of results which link to hope.php with various query strings that seem to generate different groups of seo terms like so: (the second result from the top is legitimate, all the rest are not) Here is the source of "hope.php": http://pastebin.com/7Ss4NjfA And here is the decoded version I got by replacing the eval()s with echo(): http://pastebin.com/m31Ys7q5 Any ideas where this came from or what it is doing? I've of course already removed the file from the server, but I've never seen code like this so I'm rather curious as to its origin. Where could I go to find more info about something like this?

    Read the article

  • Debian package libmarkdown-php, how can I use it? [closed]

    - by JamesM-SiteGen
    Hello all, I am just wondering how do you implement libmarkdown-php in a php script? By this, I mean: What code do I run to use the markdown library? Does it simply just add one function? Does it allows me to encode markdown2html and vise versa? Where is a doc for this package, I can't find one? :( Okay, so it terns out that I found the docs, just did not match them up, the project-page did not contain any info on it being the Squeeze package libmarkdown-php, Said to know it is not in Lenny. Thanks @palhmbus for matching them. :)

    Read the article

  • PHP, when to use iterators, how to buffer results?

    - by Jon L.
    When is it best to use Iterators in PHP, and how can they be implemented to best avoid loading all objects into memory simultaneously? Do any constructs exist in PHP so that we can queue up results of an operation for use with an Iterator, while again avoiding loading all objects into memory simultaneously? An example would be a curl HTTP request against a REST server In the case of an HTTP request that returns all results at once (a la curl), would we be better off to go with streaming results, and if so, are there any limitations or pitfalls to be aware of? If using streaming, is it better to replace curl with a PHP native stream/socket? My intention is to implement Iterators for a REST client, and separately a document ORM that I'm maintaining, but only if I can do so while gaining benefits from reduced memory usage, increased performance, etc. Thanks in advance for any responses :-)

    Read the article

  • PHP or RoR... Which is simpler?

    - by foreyez
    I'd like a server side scripting language for the web either php or ror: to do some dirty simple data fetching and eventually handing it off to my ajax app. I usually use php for this but I keep hearing the ror buzz word. I'm wondering for those who have used both, which is ultimately simpler to get something quick and dirty running? I'm a bit turned off to RoR as it seems to have many files (it's more of a framework), whereas php can potentially just be one file and that's it. But maybe I'm wrong, can you clue me in?

    Read the article

  • pascal triangle in php (anything wrong with this solution?) [migrated]

    - by zhenka
    I saw that one of the interview questions could be building a pascal triangle. Is there anything wrong with this particular solution I came up with? function pascal_r($r){ $local = array(); if($r == 1){ return array(array(1)); } else { $previous = pascal_r($r - 1); array_push($local, 1); for($i = 0; $i < $r - 2 && $r > 2; $i++){ array_push($local, $previous[$r-2][$i] + $previous[$r-2][$i + 1]); } array_push($local, 1); } array_push($previous, $local); return $previous; } print_r(pascal_r(100));

    Read the article

  • php_memcache.dll for PHP 5.3

    - by whobutsb
    Hello all, I recently setup a server using the latest version of XAMPP for Windows. With it came PHP 5.3. I'm now looking for a memcache.dll file that works with PHP 5.3 I've used some of the previous .dll files and recieved an error message: "PHP Startup: memcache: Unable t initialize module. Module compiled with module API=20060613 PHP compiled with module api=20090626 These options need to match" Any links to a PHP 5.3 memcache.dll file would be greatly appreciated. Thanks for the help!

    Read the article

  • Browser not loading Php pages

    - by ihaveitnow
    Im using a linux machine, and I followed the instructions seen on http://jm2.php.net/manual/en/install.php to setup php, apache and my sql. I did exactly what it said and nothing more, but when I try to open a .php file with firefox or chrome, it downloads...? Im following a tutorial on learning php seen here: http://devzone.zend.com/node/view/id/625 Is there something im not doing or doing wrong? All answers are appreciated.

    Read the article

  • Php error in closure compiler execution

    - by Mohammad
    When I run php-closure i get a PHP error Undefined index: HTTP_IF_NONE_MATCH in <b>/php-closure.php</b> on line <b>183</b> Line 184 of php-closure is trim($_SERVER['HTTP_IF_NONE_MATCH']) == $etag) { This error only happens when closure has already written the compressed javascript file to the directory once, if the directory is emptied the error does not appear. What does this error mean and how can I avoid it? Thank You So Much!

    Read the article

  • using php's libcurl to register user and upload file to server

    - by tunpishuang
    here is a site http://www.lyrkjsw.gov.cn that can let the registered user to upload file (e.g. images or office files) to the site. i want to register user and upload image to this site using libcurl binding with php. only registered user can upload image. so i use cookiejar stored in c:\cookie.txt after register and use c:\cookie.txt in uploadImg() function . register user is valid but failed to upload image , can anybody know is there any mistake of my code: <? /* options */ //the list url $expUrl='http://www.lyrkjsw.gov.cn/hbcms/user/list_resource.php'; //the user info to be registered $regUser='jiong'; $regPass='jiong'; $regMail='[email protected]'; $regUrl=str_replace('list_resource.php','register.php',$expUrl); // options for image upload $fileDir='@D:\img\b.jpg'; $fileTitle='aaaaaaaaaaaaa'; $fileDesc='aaaaaaaaaaaaadesc'; $uploadImgUrl=str_replace('list_resource.php','add_resource.php',$expUrl); /* register function */ function reg($regurl,$u,$p,$m) { $ch = curl_init(); $options=array( CURLOPT_URL=>$regurl, CURLOPT_RETURNTRANSFER=>true, CURLOPT_POST=>true, CURLOPT_POSTFIELDS=>'mod=register_now&next_url=index.php&addon_app=&referrer_id=&login_name='.$u.'&login_pass='.$p.'&confirm_login_pass='.$p.'&login_email='.$m.'&nickname=&gender=0&qq=&mobile=&telephone=&true_name=&website_name=&website_url=&my_question=&my_answer=', CURLOPT_COOKIESESSION=>true, CURLOPT_HEADER=>true, CURLOPT_COOKIEJAR=>'c:\cookie.txt' ); curl_setopt_array($ch,$options); $data = curl_exec($ch); if(strpos($data,'??')){ printf("register ok :)\n"); curl_close($ch); return true; }else{ printf("register failed:(\n"); curl_close($ch); return false; } } /* image uploading function */ function uploadImg($uploadimgurl,$filedir,$filetitle,$filedesc) { $ch = curl_init(); $options=array( CURLOPT_COOKIEFILE=>'c:\cookie.txt', CURLOPT_URL=>$uploadimgurl, CURLOPT_RETURNTRANSFER=>1, CURLOPT_POST=>1, CURLOPT_POSTFIELDS=>" 'MAX_FILE_SIZE'='33554432'& 'preview_area_id'='upload_file'& 'editor_area_id'='body'& 'js_function'=''& 'resource_id'=''& 'show_top_part'='no'& 'file_1'=$filedir& 'file_title_1'=$filetitle& 'file_desc_1'=$filedesc " ); curl_setopt_array($ch,$options); $data = curl_exec($ch); if(strpos($data,'??')){ printf("upload ok :)\n"); }else{ printf("upload failed :(\n"); } curl_close($ch); } if(reg($regUrl,$regUser,$regPass,$regMail) != false) { uploadImg($uploadImgUrl,$fileDir,$fileTitle,$fileDesc); } http://www.lyrkjsw.gov.cn/hbcms/user/list_resource.php (list file page) http://www.lyrkjsw.gov.cn/hbcms/user/register.php (register page) http://www.lyrkjsw.gov.cn/hbcms/user/add_resource.php (image uploading page)

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >